MUC offline messages

Hi,

I don’'t know, may be it is a correct behaviour, but MUC messages is appearing in the JM jiveoffline database. I thought that MUC is like a chat, and when user goes offline it is not recieving any messages. This problem is become more serious, if take into account bug described in http://www.jivesoftware.org/community/thread.jspa?threadID=16534&tstart=0

Impact of this issues in conjunction affects very fast growing of offline messages database.

Regards,

Tim

in MUC this is not an “offline messages” but “room history”. So every user connected with room should see some amount of last messages. Of course you can disable that in ADmin Console. Dont know if i have understood you right.

Hey Tim,

Users that never sent an available (public) presence are not going to get messages. Those kind of users can only exchange IQ packets with the sever but not get messages or presences. Therefore, I would recommend sending the available presence before joining a room. This will avoid the offline messages as well as the users that remain in the room. BTW, you may also want to consider enabling the “Idle User Settings” in the admin console to kick users that have been idle for a number of minutes.

We do not yet implement url=http://www.jabber.org/jeps/jep-0079.htmlJEP-0079: Advanced Message Processing[/url] so messages can currently be sent to other connections of the same user or be stored offline. Once we support that JEP I think that all packets sent from the MUC service should request to “match the resource” and “drop (never store offline)” if user is offline.

Meanwhile, until JEP-79 is implemented we may include a couple of fixes for this problem. I will keep this thread updated with our progress.

Thanks,

– Gato

Hey Tim,

In the next nightly build you will find a fix for JM-467. Anyway, I recommend sending an available presence before joining the room so users can actually join the room.

Regards,

– Gato

Hello,

Thanks for very fast patch. I needed it very much.

Regards,

Tim

Fix is not ok

There is thread synchronization problem in function initialize(). Sometimes it is possible to get “null.servername” value for variable mucServiceDomain in class OfflineMessageStrategy. Here is my resolution of this problem:

Index: D:/Work/JiveMessenger 2.3.1/src/java/org/jivesoftware/messenger/OfflineMessageStrategy.java

===================================================================

— D:/Work/JiveMessenger 2.3.1/src/java/org/jivesoftware/messenger/OfflineMessageStrategy.java (revi sion 3112)

+++ D:/Work/JiveMessenger 2.3.1/src/java/org/jivesoftware/messenger/OfflineMessageStrategy.java (work ing copy)

@@ -32,7 +32,7 @@

private OfflineMessageStore messageStore;

private JID serverAddress;

private PacketRouter router;

  • private String mucServiceDomain;
  • private MultiUserChatServer mucService;

public OfflineMessageStrategy() {

super(“Offline Message Strategy”);

@@ -70,6 +70,7 @@

// Ignore packets sent from the MUC service

// TODO Remove this code when JEP-79 is implemented and MUC packets include the drop action

JID senderJID = message.getFrom();

  •        String mucServiceDomain = mucService.getServiceDomain();
    

if (senderJID != null && mucServiceDomain.equals(senderJID.getDomain())) {

return;

}

@@ -128,7 +129,7 @@

super.initialize(server);

messageStore = server.getOfflineMessageStore();

router = server.getPacketRouter();

  •    mucServiceDomain = server.getMultiUserChatServer().getServiceDomain();
    
  •    mucService = server.getMultiUserChatServer();
    

serverAddress = new JID(server.getServerInfo().getName());

String quota = JiveGlobals.getProperty(“xmpp.offline.quota”);

/code

Hey Tim,

After reading JEP-160 I decided to change the overall idea. Try with the next nightly build. BTW, JM-467 was updated with the new requirement/improvement.

Thanks,

– Gato