tigase lost message when client disconnect network

xiaotu ju
Added almost 5 years ago

tigage server lost message when client disconnect from network, tigase not store message as offline-msg,when client login again,the message lost

Replies (8)

Added by Natale Vinto almost 5 years ago


tigase stores messages by AMP default plugin if users disconnects correctly announcing its unavailability, otherwise it tries to send to a broken socket the message and it is lost if any shrewdness is not taken.

Then, you should write your tigase version and your in order to understand if it is your misconfiguration issue or just the behaviour just described.


Added by xiaotu ju almost 5 years ago

tigase version is lastet 5.3.0 snapshot ,checkout from repository.

now psi receive msg when network disconnect ,but tigase mobile android can't receive any message when network disconnect

here is init config



--virt-hosts = liuzh-vh






--comp-name-1= muc

--comp-class-1= tigase.muc.MUCComponent



--comp-name-3 = test

--comp-class-3 = tigase.test.TestComponent





Added by Natale Vinto almost 5 years ago

Psi clients receive messages because they announce their unavailability by presence, if you disconnect them or just quit Psi there is that action triggered and the server can store messages offline due its internal logic and plugins registered for message stanzas. While in mobile networks instead, if you are not available for a certain amount of time, the server try to send you the message on a broken socket and the message is lost, even if a new xmpp session is started. Then, you should enable XEP-0198 in both clients and server, in order to resume streams and try manage faulty network disconnects


Added by Artur Hefczyc TigaseTeam almost 5 years ago

What library or client do you use on Android? As pointed out by Natale, XEP-0198 is recommended to improve message delivery reliability. The basic XMPP RFC does not give you any way to ensure message is delivered. A couple of extensions address different aspects of the data delivery. XEP-0198 is probably the most basic one which should be considered first. Both the Tigase server and our Android library support this XEP.

Added by shen wr almost 5 years ago

thks,I have also encountered this problem, then use XEP-0198 to solve the problem.

I would like to ask another question, can explain the exp-0198 in tigase is how to achieve it??

Added by Wojciech Kapcia TigaseTeam almost 5 years ago

Information can be found in Server features -> XEP-0198: Stream Management :

To enable Stream Management you need to add following line to etc/ file to enable Stream Management processor in c2s component: c2s/processors[s]=urn:xmpp:sm:3

Added by shen wr almost 5 years ago

hi Wojciech Kapcia :

I really want to know is : where are packets ( for resuming),in memory? in db?

Added by Natale Vinto almost 5 years ago


they are in memory. You should been able to see a SessionWalker in logs that does the job. They live until resumption timeout expires (default for tigase is 60 seconds)