1
votes

I am working on XMPP chat application and everything seems to be working fine. And my offline messages are received at the server but for some heavy messages , the messages are not delivered to the server.

I am stuck with this issue. Any help will be appreciated

1

1 Answers

1
votes

Some server limits the size of stanza that can be send to protect the server against abuse. For example, as a default, the stanza limit for ejabberd is 50kb. If you try sending a larger stanza, the server will reject it and close the connection.

For ejabberd, you should look into the parameter max_stanza_size of ejabberd_c2s listener. This is documented here: http://docs.ejabberd.im/admin/guide/configuration/#listening-ports

I do not recommend changing this value which should be enough for normal XMPP usage. You should consider rethinking your application design as your issue may be a sign that you are trying to transfer too much data inband. You should consider doing out of band transfer (file transfer, etc).