tencent cloud

Feedback

Queue Management

Last updated: 2024-01-03 10:17:36

    Overview

    This document describes how to create a queue service and send a message in the TDMQ for CMQ console.

    Entering the queue list

    Log in to the TDMQ console, select Queue Service on the left sidebar, and select a region.

    Creating a queue

    1. On the queue list page, click Create and configure the basic information of the queue.
    Parameter
    Description
    Queue Name
    Queue name is case-insensitive and cannot be modified once created. It is the primary key of a queue service and the unique identifier of a resource. It is used to specify a queue when APIs are called for operations.
    Resource Tag
    It is optional and can help you easily categorize and manage TDMQ for CMQ resources in many dimensions. For detailed usage, see Managing Resource with Tag.
    Max Message Unack Time
    It ranges from 30 seconds to 12 hours. If the consumer client fails to acknowledge a received message within this time period, the server will automatically acknowledge the message.
    Even if you have set the delay time for a message, the max message unack time will still start from the time when the message is actually sent. For example, if the max message unack time is set to one hour while the message is set to be sent two hours later, the message will be deleted one hour later, causing message loss. Therefore, make sure the max message unack time is longer than the delay time of the message.
    Long Polling Wait Time for Message Receipt
    During the long polling wait time, a message consumption request will return a response only after a valid message is fetched or the long polling times out, which is similar to the long polling in Ajax requests. Value range: 0-30 seconds. A value lower than 3 seconds is recommended, as a high value may cause more duplicated messages.
    Hidden Duration of Fetched Messages
    A queue’s VisibilityTimeout attribute in seconds. Value range: 1–43,200 seconds (1s–12 hours). A default value of VisibilityTimeout is set for each message. The visibility timeout duration starts when the worker receives the message. If the worker fails to process the message within this duration, the message may be received and processed by another worker.
    Dead Letter Queue
    A dead letter queue is used to process messages that cannot be consumed normally. After retry limit is reached, if the messages still cannot be consumed, it indicates that the consumer cannot properly consume the messages under normal circumstances. At this time, instead of immediately discarding the messages, MQ will send them to the special queue corresponding to the consumer.
    2. Click Next to configure message rewind.
    If the “Message Rewind” option is not enabled, a message that has been consumed by a consumer and confirmed for deletion will be deleted immediately.
    If this option is enabled, you need to specify a "rewindable time range" not greater than the message lifecycle, preferably the same for easier troubleshooting.
    3. Click OK, and you can see the created queue service in the queue service list.

    Sending Messages

    1. On the queue list page, click Send Message in the Operation column of the target queue.
    2. Enter the message content and click Send to send a testing message to the recipient.
    
    
    
    Note:
    Enter the content to be sent of at least 1 byte. The maximum length is subject to the set MaxMsgSize attribute.

    Resetting consumption status

    After the consumption status is reset, heaped messages can be quickly redistributed to downstream consumers. In this way, the reset operation can solve the message heap problem without message loss.
    Note:
    On the queue list page, click Reset Consumption Status in the Operation column of the target queue, confirm your operation in the pop-up window, and the consumption status can be reset.
    
    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