I am trying out ActiveMQ Artemis for a messaging design. I am expecting messages with embedded file content (bytes). I do not expect them to be any bigger than 10MB. However, I want to know if there is a configurable way to handle that in Artemis. Also is there a default maximum message size it supports? I tried and searched for an answer but could not find any. Also, my producer and consumer are both .Net AMQP implementations.
2
votes
1 Answers
3
votes
ActiveMQ Artemis itself doesn't place a limit on the size of the message. It supports arbitrarily large messages. However, you will be constrained by a few things:
- The broker's heap space: If the client sends the message all in one chunk and that causes the broker to exceed it's available heap space then sending the message will fail. The broker has no control over how the AMQP client sends the message. I believe AMQP supports sending messages in chunks but I'm not 100% certain of that.
- The broker's disk space: AMQP messages that are deemed "large" by the broker (i.e. those that cannot fit into a single journal file) will be stored directly on disk in the
data/largemessagesdirectory. The ActiveMQ Artemis journal file size is controlled by thejournal-file-sizeconfiguration parameter in broker.xml. The defaultjournal-file-sizeis 10MB. By default the broker will stop providing credits to the producer when disk space utilization hits 90%. This is controlled by themax-disk-usageconfiguration parameter in broker.xml.