XMPP error item-not-found for a custom stanza

1,107 views
Skip to first unread message

Harish Vishwanath

unread,
Aug 21, 2012, 11:01:22 PM8/21/12
to sleekxmpp-...@googlegroups.com
Hello

I am using sleekxmpp 1.1.0 with Openfire XMPP server.

I have made use of custom stanzas under <message> stanza to send custom data. However, I get back :

<message to="c...@mycomm.jabber.com/6296d125" from="t...@mycomm.jabber.com" type="error"><body>Point Data</body><pointdata xmlns="http://mycomm.jabber.com/custom/pointdata"><timestamp>2012-08-22 08:01:54.709727</timestamp><type>1</type><data>mydata</data></pointdata><error code="404" type="continue"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></message>

I observe this whenever cm1 connects to the server, without tm1 being online. tm1 also implements the custom stanza and knows how to get information. The moment tm1 comes online, it receives all the data sent by cm1. After this, even if tm1 disconnects, cm1 can continue to send messages without getting the above error.

I am unable to understand the cause of this behavior. Any help is greatly appreciated.

Regards,
Harish

Lance Stout

unread,
Aug 21, 2012, 11:58:56 PM8/21/12
to sleekxmpp-...@googlegroups.com
This is just how Openfire is dealing with handling message delivery to offline contacts.

Based solely on the error message and without knowing the specifics of how Openfire manages to work, here is what I think is going on:

1) Message is bounced back with an item-not-found error because the tm1 account has no active connections. The error is marked as 'continue' as just a warning about the situation, and the message is stored for later delivery.
2) A client for the tm1 account comes online, and the messages stored for later delivery are delivered. New messages from cm1 should be delivered immediately.
3) The tm1 client goes offline, leaving no active connections for the tm1 account. Here I'd need one more piece of information: did you only get the error on the first message sent (per cm1 session) while tm1 was offline? If so, then the server is not sending the error because you've already received the warning, and will just silently store the messages for later delivery. If you were getting the error in multiple, consecutive message attempts then I'm not sure.


-- Lance

Harish Vishwanath

unread,
Aug 25, 2012, 3:01:31 AM8/25/12
to sleekxmpp-...@googlegroups.com
Hello

Thanks very much for your response.

For 3), When cm1 comes up and there is not tm1, the server sends out the stanza error message. However, if tm1 is online, and then goes offline, no error messages are sent.

- Does this mean, this stanza error message can be ignored? Since the message will be delivered?
- When tm1 comes up, does it inform the server that the custom stanza is supported and accepted? Does sleekxmpp library do something along these lines?
- My recipient will be using Java smack library, and I am not sure if the above beharvior will cause any missed messages.

Regards,
Harish

Lance Stout

unread,
Aug 25, 2012, 3:11:52 AM8/25/12
to sleekxmpp-...@googlegroups.com
> For 3), When cm1 comes up and there is not tm1, the server sends out the stanza error message. However, if tm1 is online, and then goes offline, no error messages are sent.

I'm still curious about how many times the server responds with the error while tm1 is initially offline. For every message sent, or just the very first one?

> - Does this mean, this stanza error message can be ignored? Since the message will be delivered?

Yes, because the server is marking the error with type="continue" in this case, and as long as you have offline message delivery enabled.

> - When tm1 comes up, does it inform the server that the custom stanza is supported and accepted? Does sleekxmpp library do something along these lines?

The server shouldn't need to care. But, Sleek does support it through service discovery and entity caps (XEP-0030/XEP-0115) if you advertise a feature for your custom stanza.

Harish Vishwanath

unread,
Aug 27, 2012, 10:22:41 AM8/27/12
to sleekxmpp-...@googlegroups.com
On Sat, Aug 25, 2012 at 12:41 PM, Lance Stout <lance...@gmail.com> wrote:
> For 3), When cm1 comes up and there is not tm1, the server sends out the stanza error message. However, if tm1 is online, and then goes offline, no error messages are sent.
I'm still curious about how many times the server responds with the error while tm1 is initially offline. For every message sent, or just the very first one?
 
It will send out the error message every time cm1 comes up and tm1 is offline.
 
> - Does this mean, this stanza error message can be ignored? Since the message will be delivered?

Yes, because the server is marking the error with type="continue" in this case, and as long as you have offline message delivery enabled.

Okay. I am not sure why the server stops sending such messages whenever tm1 comes online. Even if tm1 goes offline after coming up atleast once, server never sends out these messages. 
 
> - When tm1 comes up, does it inform the server that the custom stanza is supported and accepted? Does sleekxmpp library do something along these lines?

The server shouldn't need to care. But, Sleek does support it through service discovery and entity caps (XEP-0030/XEP-0115) if you advertise a feature for your custom stanza.

Thanks. Will look into it and see how to add this to discovery response.
Reply all
Reply to author
Forward
0 new messages