A centerfire is more reliable than a rimfire as well. How many times have people reported here of so many misfires in a box of .22? Not to say centerfire ammunition doesn't have the occasional misfire but they're still more reliable than a rimfire.
Neither is optimal for self-defense but a face full of either will likely deter an attacker. It could also enrage the attacker if he's high and you can't short circuit his CNS. There's no magic bullet.
This X 100. ^^^^ Rimfire is never as reliable as center fire - period.