igniterealtime/openfire-monitoring-plugin

MAM support broken/not reliable

Opened this issue · 0 comments

I've always had problems with some clients supporting MAM when connected to
OpenFire (v4.6.0).
In particular I've experienced some very strange issues when using Gajim (1.2.0)
in parallel with Conversations: while the latter usually shows history updates
right upon re-connection, the former instead shows frequently messages not in
chronological order and many times the last message is duplicated.

I initially thought it was due to a Gajim bug, so I investigated and tested the
situation with a developer which reported my server MAM support (plugin v2.1.0)
to be broken, quoting directly from him:

Hi, your MAM seems very broken

It does not add the stanza-id of the archive to received messages, which
means usually its not archived.

But later we receive the same stanza from the archive with a invalid id of
79, it must be UUID

<message xmlns="jabber:client" xml:lang="en" to="lovetux@host.org" from="otherjidI" type="chat" id="efd80e13-f5e1-4413-99b7-9e41d00dfb52"> <origin-id xmlns="urn:xmpp:sid:0" id="efd80e13-f5e1-4413-99b7-9e41d00dfb52" /><request xmlns="urn:xmpp:receipts" /> <active xmlns="http://jabber.org/protocol/chatstates" /><markable xmlns="urn:xmpp:chat-markers:0" /><body>a</body> </message>

later

<message xmlns="jabber:client" to="lovetux@host.org/gajim.6TY6DZBA"> <result xmlns="urn:xmpp:mam:2" queryid="7002b474-9d40-44b4-a52a-fd8484a67c38" id="79"> <forwarded xmlns="urn:xmpp:forward:0"> <delay xmlns="urn:xmpp:delay" stamp="2021-01-04T19:59:06.760Z" /> <message xmlns="jabber:client" xml:lang="en" to="lovetux@host.org" from="other jid" type="chat" id="efd80e13-f5e1-4413-99b7-9e41d00dfb52"> <origin-id xmlns="urn:xmpp:sid:0" id="23f55abb-4d34-4f9f-a30a-6ff7e2b37f3a" /> <request xmlns="urn:xmpp:receipts" /> <active xmlns="http://jabber.org/protocol/chatstates" /> <markable xmlns="urn:xmpp:chat-markers:0" /> <body>a</body> <delay xmlns="urn:xmpp:delay" stamp="2021-01-04T19:57:49.749Z" from="host.org" /> </message> </forwarded> </result> </message>

Updating the plugin to v2.2.0 does not improve by much the situation, I still
get duplicate messages quite frequently upon re-connection.

This could be the cause also of #127.