Closed sylvainleris closed 2 years ago
Yes, adding a disableStreamManagement option would be great
In general I am not in favor of adding configuration options to @xmpp/client
It is meant to be a ready to use standard client that just works.
If the default configuration doesn't work in standard/federated network then I'd rather address it as a bug.
Otherwise I'd suggest using @xmpp/client-core
and include what you need see https://github.com/xmppjs/xmpp.js/blob/master/packages/client/index.js
I'd suggest looking at prior art here and see how clients behave after receiving this error.
Any xmpp library I have used (Smack, XMPP Framework, etc.) provides a way to define which extensions to enable/disable. By default, it's good that SM is enabled. However, there are cases when one wants to disable certain extensions. The choice should be given
@jonathanve please take the time to read and understand my comment. That choice is given - use @xmpp/client-core
.
If that doesn't work for you, open a separate issue with your use case.
I'd suggest looking at prior art here and see how clients behave after receiving this error.
The problem is the server close the connection after "Too many unacked stanzas" message. After that, client connects again, but not respond fast enough, so, the server close the connection again.
The problem is the server close the connection after "Too many unacked stanzas" message. After that, client connects again
Ok so far so good :+1: working as expected (as far as xmpp/client
is concerned)
but not respond fast enough
Can you elaborate?
Why not and respond to what?
great, I'll test with @xmpp/client-core
https://github.com/xmppjs/xmpp.js/pull/897#issuecomment-864129215
Feel free to comment if you can share more information about what is going on in case you believe xmpp.js is misbehaving.
In some case, ejabberd close connection with this message : "Too many unacked stanzas". This appears when huge number of users send "subcribe" stanzas and then @xmpp/client has not enough time to "ack" the stanza. So, in order not to update ejabberd server configuration (increase max_ack_queue or disabled it), we can simply add boolean disableStreamManagement to force disabling XEP-0198 directly in the client.