RabbitMQ: maximum size of a message

May 22, 20251 min read

RabbitMQ: maximum size of a message

What is the maximum size of a message in RabbitMQ?

The maximum size of a message in RabbitMQ is not defined by the protocol, but by the implementation. Unfortunately, this value is not well documented and has changed a lot over time, so we made this short article to summarize the current state of affairs.

RabbitMQ message size limits by version

  • As of version 4.0, the maximum size of a message in RabbitMQ is 16 MiB (16,777,216 bytes). Checkout the GitHub thread.
  • In version 3.9 and above, the default limit is 128 MiB (134,217,728 bytes). This limit can be bumped up to 512 MiB (536,870,912 bytes) by setting the max_message_size configuration option. See GitHub thread.
  • Before that, the limit was set to 2 GiB (2,147,483,648 bytes).

What is the maximum number of characters in a message in RabbitMQ?

Typically, when encoding a string in UTF8, each ASCII character takes a single byte, so in version 4.0, the maximum number of characters in a message is 16,777,216 characters. However, some non-ASCII characters take more space, for instance accents or emojis. In this case, the maximum number of characters in a message can be lower since some characters take up more space.

IMPORTANT limitation of the management plugin

The RabbitMQ management plugin has a limitation that prevents it from displaying messages larger than 50,000 characters (messages are truncated). If you need to read / consume larger messages, you can use RabbitGUI instead, which does not have this limitation.

More articles about RabbitMQ

How to visually explore RabbitMQ queue bindingsHow to visually explore RabbitMQ queue bindingsThere are many ways messages can be routed to queues in RabbitMQ, and it can be hard to understand how they are connected in a single placeDebugging policies in RabbitMQDebugging policies in RabbitMQWhile rules regarding which policies are applied to which queues are simple, visually understanding what is going on when something does not behave as expected might be trickyHow to introspect dead-letter queues with RabbitMQHow to introspect dead-letter queues with RabbitMQBy design, RabbitMQ has no API to peek at arbitrary messages, search for a specific one, or pick one at random. RabbitGUI is a tool that lets you introspect your dead-letter queues easily

RabbitGUI, the missing RabbitMQ IDE

Debug, monitor, and manage RabbitMQ with a modern developer interface.

Try nowRabbitGUI screenshot