1

I am using xmpp.js as xmpp chat client inside react-native for both android+ios with MongooseIM as chat server. I want to implement stream management acks in the App. But according to the issue#540, xmpp.js doesn't officially support stream management for now. What can be the alternate to this?

I need the stream management module only to send/receive acks between c2s and s2s. Please guide.

Shubham1164
  • 357
  • 6
  • 16

1 Answers1

1

Stream Management, if not available in your client library of choice, is somewhat complex to implement - though definitely would be welcome by the open source community ;)

XMPP Ping is a simpler alternative to detect broken connections. It's available in a range of servers including MongooseIM and ejabberd. The idea is that any side of the connection sends a ping IQ - since IQs are standardised to require responses, if a response does not come in a predefined time interval, you can assume such a connection is dead. There's no protocol for message retransmission like with Stream Management, but if you're running with Message Archive Management (mod_mam) all the messages should be stored safely anyway.

Alternatively, as somebody has suggested in the issue you link, you could switch to Stanza.io which supports XEP-198.

erszcz
  • 1,630
  • 10
  • 16
  • Thanks for answering. I have tried to use stanza.io with react-native but it throws so many errors, it seems its not readily compatible with it. But I will give some tries on that. – Shubham1164 Nov 13 '18 at 10:19