All Products
Search
Document Center

ApsaraMQ for RocketMQ:Manage tags

Last Updated:Nov 19, 2025

Tags can be used to identify and classify ApsaraMQ for RocketMQ resources, facilitating future queries and aggregation. In ApsaraMQ for RocketMQ, tags can be added, modified, and removed for instances, topics, and groups. This topic covers common tag use cases, usage notes and limits, and tag operations.

Use cases

Managing resources becomes increasingly difficult as you create more of them. In this case, you can use resource names for identification and tags to classify resources by domain, purpose, or user. After tagging resources, it's easy to quickly query and filter them by tag.

The following figure shows an example of tag management. Without tags, topics can only be managed and identified by their names. As your business grows and the number of topics increases, topic management becomes more challenging. In this case, classify topics by business scenario by attaching a corresponding tag to each. Once tags are applied, you can query, filter, and manage topics efficiently using tag keys and values.标签管理

Usage notes

  • Tags are represented as key-value pairs.

  • Each tag key must be unique in an ApsaraMQ for RocketMQ instance.

    For example, if an instance has the city:shanghai tag, you need to delete it before attaching the city:shenzhen tag.

  • For information about how to design the key-value pairs, see Tags.

Limits

  • Tag keys are case-sensitive and must be 1 to 64 Unicode characters in length.

  • Tag values are case-sensitive and must be 1 to 64 Unicode characters in length.

  • A maximum of 20 tags can be attached to a resource.

  • A tag key cannot start with aliyun or acs:, contain http:// or https://, or be an empty string.

  • A tag value cannot contain http:// or https://. It can be an empty string.

  • Tags are region-specific. For example, tags created in the China (Hangzhou) region are not visible in the China (Shanghai) region.

Add a tag

Note

Adding a tag to an instance, topic, or group follows a similar process. This section explains how to add a tag to an instance.

  1. Log on to the ApsaraMQ for RocketMQ console. In the left-side navigation pane, click Instances.

  2. In the top navigation bar, select the region where your instance is deployed. For example, you can select China (Hangzhou).
    On the Instances page, the instances that are deployed in this region are displayed.
  3. On the Instances page, locate the instance to which you want to add a tag. In the Tags column, hover over the tag icon and click Edit in the message that appears.

    image

  4. In the Configure Tags dialog box, configure Tag Key and Tag Value and click OK.

Use a tag to filter resources

Note

Tag operations for instances, topics, and groups are similar. This section demonstrates how to filter instances by tag.

  1. On the Instances page, click Filter by Tag.

    image

  2. Select a tag key from the list and then choose a tag value. Instances are filtered automatically when you select a value.

    The list displays only instances with the specified tag.

    image

Modify or remove a tag

Note

This section describes how to modify or remove a tag from an instance.

  1. On the Instances page, locate the target instance, hover over the tag icon in the Tags column, and then click Edit.

    image

  2. Modify or remove a tag in the Configure Tags dialog box:

    • Modify a tag: Change the Tag Key and Tag Value, or enter a new key-value pair in a new row. Then, click OK.

    • Remove a tag: Locate the target key-value pair and click the tag_delete icon next to it. Then, click OK.

References

Tags can also be used to allocate costs. For more information, see Cost allocation rules and best practices.

The following API operations can also be used to manage tags: