RabbitMQ - Queues
- A queue is a sequential FIFO data structure in which items can be enqueued (to the back) and dequeued (from the front)
Queue Names
- Applications can assign their own queue names or ask the broker to generate a name.
- Queue names can be up to 255 bytes of UTF-8 characters
- Queue names starting with
amq.
are reserved for internal use
Queue Properties
- Name
- Durable (whether or not the queue will survive a broker restart)
- Exclusive (used by only one connection and the queue will be deleted when the connection closes)
- Auto-delete (queue will be deleted when the last consumer unsubscribes)
- Optional arguments - e.g. message TTL, queue length limit, etc.
Queue Creation
- Before a queue can be used, it has to be declared
- Declaring a queue will cause it to be created if it does not already exist
- Declaring a queue is idempotent. Creating a queue which already exists with the same attributes has no effect
- Declaring a queue which already exists with different attributes will return an error.