tencent cloud

Feedback

Policy List

Last updated: 2024-01-03 11:42:22

    Overview

    In TDMQ for RabbitMQ, in addition to required attributes such as durable and Exclusive, you can also configure some optional attributes such as x-message-ttl, x-expires, and x-max-length to get different features when creating a queue or exchange.
    However, once the attribute parameters are successfully configured for a queue or exchange through the RabbitMQ client, they cannot be changed. To change them, you have to delete the original queue or exchange and then create a new queue or exchange.
    Policy is a special usage of runtime parameters that allows you to dynamically modify some attribute parameters. A policy works at the vhost level and can match one or multiple queues or exchanges for batch management. This makes it possible for you to modify exchanges or queues created in the RabbitMQ client and greatly improves the application flexibility.

    Directions

    Creating a policy

    When creating a cluster, if the mirrored queue is enabled, there will be a default policy in the Policy tab in the console, which you can delete. You can also create a new policy.
    1. Log in to the TDMQ console, select the region, and click the ID of the target cluster to enter the Basic Info page of the cluster.
    2. Click the Policy tab at the top, select the vhost, and click Create Policy.
    3. Enter the basic policy information.
    Current Vhost:
    Policy Name: It can contain 1–64 digits, letters, hyphens, and underscores.
    Match Pattern: It is a regex used to match relevant queues or exchanges. For example, ^test.* matches all queues or exchanges beginning with test.
    Application Scope: Specify the effective scope of the current policy.
    Exchanges and queues: It indicates that the policy takes effect for all queues and exchanges matching the pattern.
    Exchanges: It indicates that the policy takes effect for all exchanges matching the pattern.
    Queues: It indicates that the policy takes effect for all queues matching the pattern.
    Priority: It defines the priority of the policy. If multiple policies apply to the same queue or exchange, the policy with the highest priority will take effect.
    4. Click Next to set the policy definition information.
    Mirror Mode: The mode of the mirrored queue, which can be all, exactly, or nodes.
    all: It indicates to mirror all nodes in the cluster.
    exactly: It indicates to mirror the number of nodes specified the mirror parameter.
    nodes: It indicates to mirror the node specified by the mirror parameter.
    Message Sync Method: Specify the method of syncing messages in the mirrored queue, which can be automatic or manual.
    Master Node Exit Processing: Specify whether to allow electing an unsynced mirror the new master when the master node gracefully exits.
    Master Node Failure Processing: Specify whether to allow electing an unsynced mirror the new master when the master node fails. To ensure the availability, we recommend you select Allow all mirrors to be elected.
    5. Click Complete.

    Editing a policy

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

    Deleting a policy

    1. In the policy list, click Delete in the Operation column of the target policy.
    2. In the pop-up window, click Delete.
    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