Project

General

Profile

What is the max length of a message?

Added by Mauricio Giacomello 6 months ago

Hey guys,

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,

Mauricio Giacomello.


Replies (4)

RE: What is the max length of a message? - Added by Artur Hefczyc 6 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 6 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,

Best regards.
Mauricio Giacomello.

RE: What is the max length of a message? - Added by Igor Khomenko 2 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 2 months ago

Igor, we are currently working on smarter SPAM filters so I'm not sure that this particular feature will be needed.

    (1-4/4)