This topic describes how to create a queue to store messages in the Message Queue for RabbitMQ console.
- Log on to the Message Queue for RabbitMQ console.
- In the Resource Distribution section of the Overview page, select the region where your instance is located.
- On the Instances page, click the name of your instance.
- In the left-side navigation pane, click Queues.
- On the Queues page, click the drop-down arrow next to vhost. From the Change drop-down list, select the vhost where you want to create a queue. Then, click Create Queue.
- In the Create Queue panel, enter a queue name in the Queue Name field and set Auto Delete. Click Advanced Settings and set the displayed parameters for the queue. Then, click OK.
Parameter Description Notes Queue Name The name of the queue.
- The name can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
- The name must be 1 to 255 characters in length.
- After a queue is created, you cannot modify its name. If you want to modify its name, delete the queue and create another queue.
- The name cannot start with amq. because amq. is used as a reserved field. For example, amq.test is an invalid name.
Auto Delete Specifies whether the queue is automatically deleted after the last subscription from consumers to this queue is canceled.
- true: The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
- false: The queue is not automatically deleted after the last subscription from consumers to this queue is canceled.
Advanced Settings Other parameters of the queue, such as the dead-letter exchange, dead-letter routing key, and message time-to-live (TTL).
- DeadLetterExchange: the exchange to which dead-letter messages are sent.
- DeadLetterRoutingKey: the routing key of a dead-letter message. A dead-letter exchange sends a dead-letter message to the queue whose binding key matches the routing key of the dead-letter message.
- MessageTTL: the period of time for which a message can stay in a queue before it expires. Unit: milliseconds. A message that is not consumed within the message TTL is a dead-letter message. The dead-letter message is sent to a dead-letter exchange.