Tag Archives: queues

RabbitMQ Queue Auto-Delete

Breadcrumbs for myself.

Queue config options:

  • exclusive: delete when declaring connection closes. No other
    connection can even access this. Only queues can be exclusive.

  • autodelete: delete when the last downstream thing (i.e. consumers for
    a queue, or queues for an exchange) goes away. Note that this isn't
    bound to channels or connections at all really.

  • exclusive is more frequently useful than autodelete

More about auto-delete:

  • auto_delete queues will delete themselves when their consumer count drops to 0 from a higher number. Otherwise
    they would delete themselves as soon as they were declared...

  • The downside of exclusive queues is that they can only have consumers on the connection that created them. So this doesn't work for shared queues, or queues created by some app that are subsequently to be consumed from by some other app.

  • Auto-Delete queues not getting deleted

Other options: