Offline message timing problem?

Hi,

I found that the PacketListener doesn’'t catch offline messages that are spooled in jabberd. The offline message does show up in the debug window but is apparently not caught.

I ran my program through a debugger (Eclipse). I put a breakpoint at PacketReader.parsePackets(). The message was delivered.

I suspect something to do with the delays in threading?

Which debug window does it show up in? The middle and bottom or just the middle? Knowing that will tell us if the packet is getting interpreted by Smack or not. Also, can you paste in the packet so that I can see what it looks like?

Regards,

Matt

Both the middle and bottom. Looks like just any ordinary packet, doesn’'t it?

subjecttest

Since I’'m beginning to understand the Smack architecture, I can do some more extensive debugging - just tell me what I can do.

Haha funny love smiley.

that’'s <jabber: x: delay>

If you see the packet in the middle and bottom window, Smack is definitely getting it. Have you registered a PacketListener or PacketCollector to get every Message packet delievered to it? That should be a suitable way to get that packet. Or, you could refine that by only listening for messages that have a <jabber: x: delay> packet extension.

Regards,

Matt

Solved.

My mistake was to add the listener AFTER the login().

I moved it right before, and the offline messages are received.

A fine point to add to the documentation…

Another thing I found - jabberd doesn’'t store Properties in offline messages.

I had to send some binaries through offline messages, so I manually serializated the data, converted it to base64 and stuffed it in the body.

A fine point to add to the documentation…

Do you have any suggestions on what to add to the docs? Which point in particular was confusing?

Thanks,

Matt

Nothing confusing.

It’'s just not obvious to people new to XMPP that the server can send messages immediately after the login.

Do you have a suggestion on where it might be a good idea to document this?

Thanks,

Matt