All Products
Search
Document Center

ApsaraMQ for RocketMQ:Manage topics

Last Updated:Mar 11, 2026

A topic is the primary message routing construct in ApsaraMQ for RocketMQ. In the publish/subscribe (pub/sub) model, producers send messages to a topic and consumers subscribe to that topic to receive them. Organize topics by business domain -- for example, one topic for order events, another for logistics updates, and a third for payment notifications.

This page explains how to create, view, update, and delete topics in the ApsaraMQ for RocketMQ console. To manage topics programmatically, see API reference.

Before you begin

  • An ApsaraMQ for RocketMQ instance is available. To create one, see the instance management documentation.

  • You have determined the message type for the topic. Each topic supports only one message type, and this setting cannot be changed after creation. For details, see Message types.

Key constraints

Before you create a topic, review the following constraints.

ConstraintDescription
Instance-scopedA topic belongs to one instance and cannot be used across instances.
Message type is immutableThe message type you select at creation determines which messages the topic accepts. A mismatch causes O&M issues such as loss of scheduled messages during endpoint changes or instance migration.
BillingEach topic incurs occupancy fees regardless of usage. Delete unused topics to avoid unnecessary charges. For details, see Billing of the messaging feature and Billing.

Naming rules

A topic name must meet the following requirements:

  • 3 to 64 characters in length

  • Contains only letters, digits, hyphens (-), and underscores (_)

The uniqueness requirement depends on whether the instance has a namespace:

Instance typeUniqueness scopeDetails
With namespaceWithin the instanceThe name cannot duplicate an existing topic name or group ID in the same instance. Different instances can share names.
Without namespaceAcross all instances and regionsThe name cannot duplicate any existing topic name or group ID in your Alibaba Cloud account.
Note

Check whether an instance has a namespace in the Basic Information section of the Instance Details page.

Create a topic

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

  2. In the top navigation bar, select a region, such as China (Hangzhou). Click the name of the instance that you want to manage.

  3. In the navigation pane, click Topics. In the upper-left corner, click Create Topic.

  4. In the Create Topic panel, configure the following parameters, and then click OK.

    ParameterDescription
    NameA unique topic name that follows the naming rules.
    DescriptionA brief description of the topic purpose.
    Message TypeThe type of messages that this topic handles. This value cannot be changed after creation.
Important

A topic can only send and receive messages that match its message type. For example, a topic created with the Normal Message type accepts only normal messages. For details, see Message types.

Create a topic

View topic details

  1. On the Instances page, click the name of the instance that you want to manage. In the navigation pane, click Topics.

  2. In the topic list, click the topic name, or click Details in the Actions column.

Update topic description

  1. On the Instances page, click the name of the instance that you want to manage. In the navigation pane, click Topics.

  2. In the topic list, find the target topic and click Details in the Actions column.

  3. In the Basic Information section, click Edit next to the Topic Description field. Enter a new description, and then click OK.

Update topic description

Delete a topic

Warning

Deleting a topic is irreversible. After deletion, producers can no longer send messages to the topic, consumers can no longer consume messages from it, and all metadata and messages in the topic are permanently removed.

  1. On the Instances page, click the name of the instance that you want to manage. In the navigation pane, click Topics.

  2. In the topic list, find the target topic, click More in the Actions column, and then select Delete.

  3. In the confirmation dialog box, click OK.

API reference

The following API operations are available for topic management:

APIDescription
OnsTopicCreateCreates a topic.
OnsTopicDeleteDeletes a topic.
OnsTopicListQueries topics.
OnsTopicStatusQueries the total message count and last update time of a topic.
OnsTopicSubDetailQueries the subscriptions of a topic.