powered by Jive Software

Verifying message delivery

Is the absence of an XMPPException when calling Chat.sendMessage(String) enough to verify that the message was actually delivered?

I have a simple program running as a cron job that sends notifications, but occasionally messages aren’‘t delivered. This happens when the recipient is online, and I’‘ve verified that they didn’‘t just miss the message. My program’‘s log verifies that the message was sent, and no exceptions occured. The server is also set to always store messages when users are offline. This has been happening sporadically for several months and I’'m pretty stumped.

You could use the Message Event class to check to see when messages get delivered. It contains various listeners to check on different events.

The one you probably need is

deliveredNotification(String from, String packetID)

Looks like you need MessageEvent to request that you be notified of delivery, and then MessageEventNotificationListener to receive the actual notice. You’'ve definitely got me on the right track though!