MessageListener listens only for message-related packets, while PacketListener listens for all kinds of packets, which can include message-related packets, subscription-related packets, invitation-related packets, it can listen for all xml packets sent by the server, if not the filter is applied. You can also add a filter to filter specific packages. it is also used to process custom packages and write custom XMPP extensions
source share