These are completely orthogonal things.
- XMPP is a protocol, just like HTTP or WebSocket
- ejabberd is an implementation of server for such protocol in Erlang. Just like Cowboy is an implementation of server for HTTP/WebSockets.
Phoenix.PubSubis an helper library for exchanging messages between Erlang nodes.
It is not comparable at all.


















