dead-letter-exchange: | Dead-Exchange |
---|---|
max-length-bytes: | 1000 |
dead-letter-exchange: | Dead-Letter-Exchange |
---|---|
max-length-bytes: | 1000 |
overflow: | reject-publish |
Use the overflow setting to configure queue overflow behaviour. If overflow is set to reject-publish, the most recently published messages will be discarded. In addition, if publisher confirms are enabled, the publisher will be informed of the reject via a basic.nack message. If a message is routed to multiple queues and rejected by at least one of them, the channel will inform the publisher via basic.nack. The message will still be published to all other queues which can enqueue it.
To define an overflow behaviour - whether to drop messages from head or to reject new publishes, add the key overflow to a policy definition. For example:
rabbitmqctl | rabbitmqctl set_policy my-pol "^two-messages$" '{"max-length":2,"overflow":"reject-publish"}' --apply-to queues |
---|---|
rabbitmqctl (Windows) | rabbitmqctl.bat set_policy my-pol "^two-messages$" "{""max-length"":2,""overflow"":""reject-publish""}" --apply-to queues |
The my-pol policy ensures that the two-messages queue contains no more than 2 messages and all additional publishes are sent basic.nack responses as long as the queue contains 2 messages and publisher confirms are enabled.
Policies can also be defined using the management plugin, see the policy documentation for more details.
Messages from a queue can be "dead-lettered"; that is, republished to an exchange when any of the following events occur:
--
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.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/bf722f61-d46f-4b65-aef2-5cb998153402%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The requeue parameter comes from your consumers. To put it differently, it's a property of a client-sent protocol frame. You cannotset it via a policy. It is not a queue property or optional arg.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitm...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/bf722f61-d46f-4b65-aef2-5cb998153402%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/26c20010-f1ac-49e1-8d3f-fd8e1cbc0ebc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.