Search code examples
rabbitmqspring-rabbitrabbitmq-exchange

what the default max length of rabbit queue


For any given queue, the maximum length (of either type) can be defined using a policy (this option is highly recommended) or by clients using the queue's optional arguments. In the case where both the effective queue policy and arguments specify a maximum length, the minimum of the two values will be used. Queue length settings also can be enforced by operator policies.

https://www.rabbitmq.com/maxlength.html

As we can see, the rabbitmq document has told us how to set the max-length of queues. But I'd like to know what the default value of max-length is if we not do any changes. is it no limit until my server's resources not available?


Solution

  • The default maximum length of a RabbitMQ queue is unlimited, yes it has no limit until the server's resources are consumed.

    If we set up length ourselves using x-max-length or using management-console, then we have to carefully consider the need of the application if queue is frequently reaching maximum length the oldest messages will be dopped