Project

General

Profile

The table tig_pairs is growing massive when using pubsub

Sh YML
Added over 4 years ago

Hi,

We're having a tigase server setup for the purpose of pub-sub and XMPP chat messaging.

The pub-sub is being used to publish location of various cars in real time.

This is all working fine, however, the tig_pairs table has been growing massive.

I am not very familiar with the tigase db schema and about the archiving settings in tigase. I tried

to findout but did not find much.

The rows are having pkey="messages" and the value contains the entire pubsub message.

Example:

<message xmlns="jabber:client" to="test_kk@<ip address>" from="pubsub.<ip address>" id="26337"><event xmlns="http://jabber.org/protocol/pubsub#event"><items node="test_inder"><item id="1404990952867">{"id":123,"longitude":77.64402770996094,"latitude":12.960267066955566}</item></items></event><delay stamp="2014-07-10T11:14:39.703Z" xmlns="urn:xmpp:delay" from="<ip address>">Offline Storage - ip-172-31-21-246.ec2.internal</delay></message>

Can you help me understand why it is storing all the pubsub messages like this in the tig_pairs, and if there is some server setting to stop this.

Regards,

Syml


Replies (3)

Added by Wojciech Kapcia TigaseTeam over 4 years ago

This is simply offline storage, i.e. pubsub message was sent to the user that is offline. There are two ways to deal with it:

  • configure pubsub nodes to only send messages to online users;

  • disable archiving messages sent to offline users - depending on the configuration you should only enable message plugin and disable amp and/or msgoffline plugins:

--sm-plugins=+message,-msgoffline,-amp

Added by Sh YML over 4 years ago

Thanks! have now disabled these plugins. Is it safe to remove these records off from the tig_pairs table now?

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Yes, those records can be safely deleted.

    (1-3/3)