Distributed Message Service RabbitMQ

Queue Management

2024-06-27 06:37:04

Background

Messages of the DMS RabbitMQ will be put into one or more queues. The Consumer Tag is the identifier of the consumer client. You can set the consumer tag on the consumer client of DMS RabbitMQ.

Create a Queue

(1) Log in to the management console.

(2) Go to the RabbitMQ console.

(3) In the operation column of the instance list page, click Manage in the target instance row.

(4) Click Queue Management, then click the New button.

(5) Click New and the following window will appear, select the Vhost, enter the queue name, select the storage node, then click OK to create the queue.

Parameter

Description

Virtual Host

Select the virtual host to which the queue created

Name

The name of the queue. Fields starting with amq. are reserved   fields and cannot be used. For example: amq.test.

Storage Node

Queue data storage node

Persistence or Not

Whether the queue metadata is persisted to disk

Whether to delete automatically

Whether the Queue is automatically deleted after the last   Consumer unsubscribes.

Other Parameters

Message   TTL

     Message expiration   time: number type (unit: ms)

     Auto expire

     Queue expiration   time (automatically deleted after the queue is expired: number type (unit:   ms))

     Max length

     Maximum number of   messages that can be stored in a queue: number type (unit: number)

     Max length bytes

     Maximum number of   messages that can be stored in a queue: number type (unit: byte)

     Overflow behaviour

     Message receiving   policy after the maximum limit of the queue is exceeded: drop-head or   reject-publish

     drop-head: Delete   the header message, which is generally the earliest message sent, to ensure   queue availability

     reject-publish:   Refuse to receive new messages to ensure that messages are not lost

     Dead letter   exchange

     Name of Dead Letter   Exchange

     Dead letter routing   key

     Dead Letter Routing   Key

     Maximum priority

     Maximum queue   priority: To enable the priority of a message, you must set the priority of   the queue that contains the message

     Lazy mode

     Queue lazy modes:   default and lazy

     default: default   value and ordinary queue

     lazy: indicates a   lazy queue. Messages are saved to disks as much as possible, resulting in a   large number I/O operations, and little memory consumption (it is recommended   for scenarios with a large accumulation of persistent messages)

     Master Locator

     Queue save   location: client-local, min-masters and random

     client-local: nodes   used for connection during queue creation

     min-masters: Node   with the smallest number of active nodes in the cluster

     random: Randomly   specify a node by the RabbitMQ server

 View Queue

(1) Click on the target queue name to view the queue overview.

(2) Click Consumers to view the consumers in the queue.

(3) Click Binding Information to view the binding information of the queue.

(4) Click Production Dialing Test to enter the production dialing test page of the queue. You can send messages to the queue through production dialing test.

(5) Click Consumption Dialing Test to enter the consumption dialing test page of the queue. You can pull messages from the queue through consumption dialing test.

(6) Click Clear Message to enter the clear message page, then click Clear Queue to clear the queue message.

Delete Queue

(1) Click Delete on the target queue to delete the queue.

Notes:: When deleting a queue, unconsumed messages in the queue will be deleted at the same time and cannot be restored. Please operate with caution.


XH.SBbEDSWU6