Restrict presence packets sendout


We currently have a client implementation using Smack 4.1.6 which logins to openfire using a notation like:

(all logins share the XMPP account).

When a client logs into openfire, it receives hundreds of presence packets from other clients also connected to openfire. Can this be avoided, i.e. no presence packets are sent between XMPP clients? All XMPP clients that connect to openfire communicate with XMPP components attached to openfire.

I doubt it. Presence is sent by the server. It’s probably because you have a large contact list (roster). For each available contact you receive a presence.

(all logins share the XMPP account).

You. Never. Want. To. Design. It. This. Way.

Not for the problem you describe, which can likely be avoided by not sending an initial presence, but for the fantasticatillion other issues you will have with this design approach. If you have, for example, a set of IoT devices, then give them their own bare JID, do not share!

I completely agree with you. However, it is a legacy system that will require further refactoring for that… it is in the works…

Any way to not send the contact list (we use Openfire as the messaging server) that you are aware of?