tencent cloud

Feedback

Queue Management

Last updated: 2024-10-18 17:37:45

    Overview

    A queue is used to store messages. Each message will be put into one or more queues. Producers produce messages and deliver them to queues, and consumers pull messages from queues for consumption.
    Multiple consumers can subscribe to the same queue. In this case, messages in the queue will be evenly distributed to such consumers for processing, rather than making each consumer receive and process all the messages.
    This document describes how to create, delete, and query a queue in the TDMQ for RabbitMQ console.

    Prerequisites

    You have created a vhost as instructed in Vhost Management > Creating a vhost.

    Directions

    Creating a queue

    Note:
    The creation of regular queues or quorum queues is supported. You can click the following tabs to view the creation methods of different types of queues.
    Regular queue
    Quorum queue
    1. Log in to the RabbitMQ console.
    2. In the left sidebar, select Cluster > Queue tab, choose a Vhost, then click Create to enter the Create Queue page.
    3. Enter the basic information of the queue.
    
    Queue Name: Enter the queue name, which cannot be modified after creation and can contain 3–64 letters, digits, hyphens, and underscores.
    Type: Regular queue.
    Durable: Set whether the queue performs persistence.
    Node: Select the node where the queue resides.
    AutoDelete: After this feature is enabled, the queue will be deleted immediately after its last consumer unsubscribes from it.
    Queue Remarks: Enter the queue remarks of up to 128 characters.
    4. Click Next to configure common parameters.
    
    Message TTL: Messages in the queue will be discarded/sent to the dead letter exchange after the specified time elapses.
    Auto expire: The queue will be deleted if it is not used (accessed) within the specified time.
    Max length: The maximum number of messages that the queue can contain.
    Max length bytes: The upper limit of the queue's storage capacity. If it is reached, messages will be processed according to Overflow behaviour.
    Overflow behaviour: When the queue capacity reaches the upper limit, the message at the beginning of the queue will be discarded.
    Dead Letter Exchange: A message will be delivered to the dead letter exchange if it is not acknowledged within the TTL.
    5. Click Next to configure other advanced options.
    
    Single active consumer: If this option enabled, it is necessary to ensure that there must be only one consumer consuming from the queue at a time.
    Maximum priority: Configure the maximum priority of messages in this queue.
    Lazy mode: If this option is enabled, the queue will preferably store pushed messages on the disk to reduce the memory usage.
    Master locator: Configure the allocation method of the node where the master is located if the mirrored queue is configured.
    min-masters: The node hosting the minimum number of masters will be selected as the node where the master of the current queue is located if the mirrored queue is configured.
    client-local: The node the client that declares the queue is connected to will be selected as the node where the master of the current queue is located if the mirrored queue is configured.
    random: A random node will be selected as the node where the master of the current queue is located if the mirrored queue is configured.
    6. Click Submit.
    1. Log in to the RabbitMQ console.
    2. In the left navigation bar, Select Cluster > Queue tab, choose a vhost, and click Create to enter the Create Queue page.
    3. Enter the basic information of the queue.
    
    Queue Name: Enter the queue name, which cannot be modified after creation and can contain 3–64 letters, digits, hyphens, and underscores.
    Type: Quorum queue.
    Node: Select the node where the queue resides.
    Queue Remarks: Enter the queue remarks of up to 128 characters.
    4. Click Next to configure common parameters.
    
    Auto expire: The queue will be deleted if it is not used (accessed) within the specified time.
    Max length: The maximum number of messages that the queue can contain.
    Max length bytes: The upper limit of the queue's storage capacity. If it is reached, messages will be processed according to Overflow behaviour.
    Overflow behaviour: When the queue capacity reaches the upper limit, the message at the beginning of the queue will be discarded.
    Dead letter policy: Options include at-most-once and at-least-once. The at-least-once can only be selected when the overflow behavior is set to reject-publish.
    Dead letter Exchange: A message will be delivered to the dead letter exchange if it is not acknowledged within the TTL.
    5. Click Next to configure other advanced options.
    
    Single active consumer: If this option enabled, it is necessary to ensure that there must be only one consumer consuming from the queue at a time.
    Max in memory length: The maximum number of messages in the quorum queue memory.
    Max in memory bytes: The maximum total message size (in bytes) in the quorum queue.
    Initial Cluster Size: The initial cluster size of the Quorum queue.
    Leader Locator: Options include client-local and balanced. If network latency significantly affects performance, client-local policy can be selected; if you need to balance the load across nodes, balanced policy can be selected.
    6. Click Submit.

    Viewing queue details

    In the Queue list, click the ID of the target queue to view its details.
    You can view:
    Basic Info: Queue type, online consumer, dead letter exchange, and AutoDelete status. Click More Advanced Options to view all parameter settings of the queue.
    Consumer list: Information of consumers subscribed to this queue.

    Viewing binding

    Binding relationship: The routing relationships bound to this Queue.
    

    Editing a queue

    1. In the queue list, click Edit in the Operation column of the target queue.
    2. In the pop-up window, edit the queue information.
    3. Click Submit.

    Deleting a queue

    1. In the queue list, click Delete in the Operation column of the target queue.
    2. In the pop-up window, click Delete.
    Note:
    After a queue is deleted, all the configurations under it will be cleared and cannot be recovered.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support