I have built a system that uses the OpenFire XMPP server to relay presence and “command” messages in an IoT sort of environment. There are devices that monitor various sensors and update their XMPP presence so that other, central, management dashboard devices can show that information in a realtime display at a central management station. All of the devices (the “remote” monitoring devices as well as the central management station) belong to the same group and are in each others’ “roster.” We are using the RESTAPI plugin for creating users and groups and managing the group membership. Everything generally works very well. The monitors and management stations are Android tablets. The monitors are written in Java using the Smack library, where the management stations are written in Xamarin.Android and use the Matrix XMPP library.
Occasionally, we will see that the presence updates from some (but not all) of the remote monitor devices will not be reflected on the management station, but they are reflected on the “Sessions” view in the OpenFire management console. We intercept the raw incoming and outgoing XMPP XML fragments on the management station device and output them on the android log to see the actual XMPP stanzas come over the wire, and when this behavior occurs, the management stations simply do not receive the presence stanzas from the affected remote monitoring devices. Sometimes, everything will snap back into place after a period of time. Other times, simply restarting the management station app will get things back working.
I am well and truly stumped by this behavior and don’t really know where to start to look for a possible cause. The OpenFire logs (error, warn, info, debug) don’t appear to be too much help, either.
Any suggestions on how to better instrument our apps or how to decipher the OpenFire logs would be most helpful.