Offline messages being sent when a user is Online

I am using smack to communicate with a user on spark through a wildfire server. Both users are subscribed to each other and detect the other as online.

When I send a message from the command line client using smack to the user on spark, the message comes through fine, however when the user replies back to the chat, the messages are not retrieved by using the Chat.nextMessage() method. Setting DEBUG_ENABLED to true shows me that all the messages coming from the spark client have an element included, even though the user that the spark client is sending to shows as online.

Can anyone tell me why this might be happening???

This does not mean that it is in fact an offline message, it is just telling the server that it should store this message offline if the user is currently not online. As for why chat.nextMessage isn’'t working check to make sure that the same thread id is being sent as is being received.

the chat gets initiated by the Smack client and there is a thread being used on all of the message packets, but spark is using a different thread. When I send an adhoc message and specify the same thread that smack was using for the chat, then I can receive the message… Why is spark using a different thread?

Can you post the packets being sent back and forth?