What is the max length of a message?
here in the company we're developing a chat application and one of our requirements is to limit the size of a message to a certain amount of characters.
We're wondering if Tigase Server & Tigase Message Archiving have a limit of message length they can handle. We're using SQL Server and both latests Tigase/MA by the way.
Thanks in advance,
RE: What is the max length of a message? - Added by Artur Hefczyc 8 months ago
There is currently no limit on the message size. There are however, several limits on the Stanza which is sent through the server. They all can be adjusted. One of them limits number of characters sent as CData within any XML element. So this could be, in theory used as the message size limit. It is currently set to 1,048,576 characters, however, you have to remember that if you change it, it will affect all XML data sent through the server not just messages.
We could add some message limiting logic but then, there is a question, what should happen if the limit is exceeded? Cut the message, reject the message, disconnect user?
RE: What is the max length of a message? - Added by Mauricio Giacomello 8 months ago
Right. Got the point! We'll go ahead and set a limit only in the front-end side, unfortunately.
Thanks for the quick response,
RE: What is the max length of a message? - Added by Igor Khomenko 4 months ago
It would be greate if it will be possible to limit message.body CDATA because it's kind of the most popular case how people can spam server.
if the limit is exceeded then a reject message can be sent back
RE: What is the max length of a message? - Added by Wojciech Kapcia 4 months ago
Igor, we are currently working on smarter SPAM filters so I'm not sure that this particular feature will be needed.