Receiving a pong signal from an offline JID
Good day. I am working on a news service for XMPP, which sends messages according to status. When JID is offline, service should stop. Resources --------- As XMPP is presence oriented, it is needed to set extra measures, such as collecting detected resources, in order to be certain that a subject JID is indeed offline. This measure is still tested. Signals ------- I am experimenting with XEP-0199: XMPP Ping as a possible mean to confirm that an account is offline. However, while asking for a pong signal from a full JID (JID with a resource) returns an empty respond, asking for a pong signal appear to always to work when querying a bare JID (JID without a resource). PONG: sch@pimux.de/gajim.TN7Y65AS None PONG: sch@pimux.de 0.09115195274353027 PONG: sch@pimux.de/gajim.TN7Y65AS None PONG: sch@pimux.de 0.10207772254943848 My expectation was to have no respond for bare JID, when there is no connected instance to a given JID. Please advise. Kind reagrds, Schimon
A bare JID represents the account on the server, not a currently in-use resource, so you receive a reply from the server (not the user's client.) As with your previous question about presence probes, you seem to want everything presence subscription is designed for whilst explicitly avoiding the use of presence subscription, and then you complain about the problems caused by not using presence subscription. Surprisingly, the answer is: use presence subscription.
Tedd. Good afternoon. It is good to read from you. Thank you for the clarification about server reply. I think, that I do utilize presence subscription, which is possible only with contacts in roster. Eventually, I was advised to collect all resources which are being detected, and then, when contact is disconnecting and other resources apparently still online (i.e. upon event "presence-unavailable"), to check whether each of the rest resources are still online, be it by utilizing XEP-0030: Service Discovery or XEP-0199: XMPP Ping. I hope, that it is done properly. https://git.xmpp-it.net/sch/Slixfeed/commit/382c6ea44c481751af65fdb73a5ec0e1... Again. I thank you for your advise. Kind regards, Schimon On Tue, 19 Aug 2025 12:38:30 +0000 Tedd Sterr <teddsterr@outlook.com> wrote:
A bare JID represents the account on the server, not a currently in-use resource, so you receive a reply from the server (not the user's client.)
As with your previous question about presence probes, you seem to want everything presence subscription is designed for whilst explicitly avoiding the use of presence subscription, and then you complain about the problems caused by not using presence subscription. Surprisingly, the answer is: use presence subscription.
participants (2)
-
Schimon Jehudah -
Tedd Sterr