powered by Jive Software

Chat message duplication/triplicate issue

I have installed Openfire version 4.2.3, Monitoring Service plugin version 1.6.1, REST API plugin version 1.3.1. With this set up client apps (iOS and android devices) working fine till Nov 19 (Almost more than 2 years working functionality).
Now issue i notice for duplicate message,
When i send message from one client to other then openfire monitoring service add 2 entries in my SQL server in OfArchive table and OfOffline table. So other end client received two entries. If you logout from app and re-login then using Rest API i fetched all records from archive table and display into my list then ofline table entry sync with my app and same message repeating.

Issue of triplicate message
This issue behaviour same like duplicate message but difference is open fire sometimes send same message using delay keyword in xml stanza example below,

<message xmlns="jabber:client" to="423@mydomain.com" id="Sf98R-12" type="chat" from="523@mydomain.com/Android">
<body>ok test 2</body>
<thread>0bbda259-2324-46a1-b054-891932151919</thread>
<delay xmlns="urn:xmpp:delay" from="mydomain.com" stamp="2019-11-29T10:22:56.229Z"></delay>
</message>

So delay message sync after sometimes.

It’s all inconsistent behaviour but frequently happened.
In short of story i facing following issues,

  1. Duplicate/Triplicate message
  2. Delay message
  3. Inconsistency.

Thanks
Rajendra

Try latest monitoring plugin version 1.8.1

Thanks for reply.
It will not impact on my local database tables (which is created during installation/setup openfire and plugins) if i upgrade monitoring plugin version 1.8.1 ?

If you want to determine what version of the plugin introduced a database change, please review the database upgrade script folder (and its commit history) here: https://github.com/igniterealtime/openfire-monitoring-plugin/tree/master/src/database

If your local database matches the latest structure as provided there, then no database changes will be applied.

Please note (and I can’t stress this enough) that Openfire is not designed to work with a database that is also used by other processed than Openfire. Openfire’s database structures might change unexpectedly, and caching mechanisms will cause unexpected behavior.

I resolved this issue pending from so many days. The duplicate message occurs when your offline messages memory buffer overflowed. In the Openfire admin panel go to Server setting > Offline messages setting there is default setting enable “Store and bounce” which behaving like the following scenario.
If one user is offline and you send a message then the message sometimes stored in an offline table or mostly in OfMessageArchive table. Then if the user login then the user got the first archive message then Openfire sync offline message to login user too so, login user gets 2 messages at the same time. If the user again logout and login then the user will get single mess10%20PM age. So this problem I resolved by selecting the option from offline messages setting “Always store”.

And for the message delay issue I resolved by updating the Openfire setup.

Maybe this issue is related to mine? Issue with OfflineMessageStore & Monitoring Plugin