How to configure MAX_MSG_SIZE?

135 views
Skip to first unread message

Giri Chintala

unread,
Jun 20, 2017, 4:48:54 PM6/20/17
to rabbitmq-users
is it possible to override MAX_MSG_SIZE defined in rabbit.hrl ? I am trying to lower the value.

Michael Klishin

unread,
Jun 20, 2017, 5:20:10 PM6/20/17
to rabbitm...@googlegroups.com
It's a compile time constant.

On Tue, 20 Jun 2017 at 23:48, Giri Chintala <chintala....@gmail.com> wrote:
is it possible to override MAX_MSG_SIZE defined in rabbit.hrl ? I am trying to lower the value.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Staff Software Engineer, Pivotal/RabbitMQ

Giri Chintala

unread,
Jun 20, 2017, 5:26:22 PM6/20/17
to rabbitmq-users

Thanks Michael for quick response.

is it possible to externalize it in future releases?

Michael Klishin

unread,
Jun 20, 2017, 5:43:29 PM6/20/17
to rabbitm...@googlegroups.com
There is very little demand for it being configurable. It's a value on the hot path
for publishing, so we think a few times before introducing more code that may be
reaching out to configuration.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Giri Chintala

unread,
Jun 20, 2017, 6:39:45 PM6/20/17
to rabbitmq-users

Default value 1MB is not huge, But misbehaving Producer can bring down Broker by sending large messages.

I believe RabbitMQ is being widely used as broker to exchange small size messages(few KBs), not as a persistent storage.

Configurable MAX_MSG_SIZE helps us protect broker from misbehaving Producers.


On Tuesday, June 20, 2017 at 5:43:29 PM UTC-4, Michael Klishin wrote:
There is very little demand for it being configurable. It's a value on the hot path
for publishing, so we think a few times before introducing more code that may be
reaching out to configuration.

On Wed, Jun 21, 2017 at 12:26 AM, Giri Chintala <vsg.ch...@gmail.com> wrote:

Thanks Michael for quick response.

is it possible to externalize it in future releases?

On Tuesday, June 20, 2017 at 5:20:10 PM UTC-4, Michael Klishin wrote:
It's a compile time constant.

On Tue, 20 Jun 2017 at 23:48, Giri Chintala <chintala....@gmail.com> wrote:
is it possible to override MAX_MSG_SIZE defined in rabbit.hrl ? I am trying to lower the value.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Michael Klishin

unread,
Jun 20, 2017, 7:40:38 PM6/20/17
to rabbitm...@googlegroups.com
Default value is 2147383648, which is 2 GiB (~ 2 GB).

A plugin that implements a channel interceptor can do this kind of limiting
but it will

 * Affect throughput a bit
 * Conflict with any other plugins that use channel interceptors, such as message-timestamp and routing-node-stamp

HAproxy offers a fair number of rate limiting options, see e.g. http://blog.serverfault.com/2010/08/26/1016491873/.
I assume many of them should work in TCP mode as well.


To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Giri Chintala

unread,
Jun 21, 2017, 2:06:40 PM6/21/17
to rabbitmq-users
I misunderstood source code 2GB Message size is pretty high for a Broker. 

I guess HA Proxy can limit rates and size.

For now, we can edit source code and compile it. 

But, Please consider making configurable if it is a simple change.
Reply all
Reply to author
Forward
0 new messages