When you change or clone an ApsaraMQ for RocketMQ instance, export its topic configurations and import them into another instance. This recreates the same topics on the destination instance without manual setup.
Exported data scope
The export file contains topic metadata only. Messages stored in topics are not exported or migrated.
| Attribute | Description | Example |
|---|---|---|
| TopicName | The unique name that identifies the topic. | OrderEvents |
| MessageType | The message type assigned to the topic. Valid values: NORMAL, TRANSACTION, DELAY, FIFO. | TRANSACTION |
| Remark | A short description of the topic. | Handles order payment events |
When to use this feature
Change an instance -- Export topics from an ApsaraMQ for RocketMQ 4.x instance and import them into a 5.x instance. Cross-version import is fully supported, so topics are automatically created on the new instance with matching configurations.
Clone topics across environments -- Maintain identical topic configurations across development, test, and production instances. Set up topics in one instance, export the file, and import it into each target instance.
Export topic data
Log on to the ApsaraMQ for RocketMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar, select a region, such as China (Hangzhou). On the Instances page, click the name of the instance whose topics you want to export.
In the left-side navigation pane, click Topics.
In the upper-right corner of the Topics page, click the
icon.
The topic data is downloaded as an .xlsx file. Each row represents one topic and contains the TopicName, MessageType, and Remark columns.
Import topic data
Import the exported .xlsx file directly, or update the exported topic data based on your business requirements before importing.
Import file requirements
The import file must follow these rules:
| Column | Rules |
|---|---|
| TopicName | 1--60 characters. Allowed characters: letters, digits, underscores (_), and hyphens (-). Must not contain system-reserved strings or special prefixes. For details, see Limits on parameters. |
| MessageType | Must be one of: NORMAL (normal messages), TRANSACTION (transactional messages), DELAY (scheduled or delayed messages), FIFO (ordered messages). |
| Remark | 1--60 characters. |
Example file content:
| TopicName | MessageType | Remark |
|---|---|---|
| Topic1 | TRANSACTION | Used to send transactional messages. |
| Topic2 | NORMAL | Used to send normal messages. |
| Topic3 | DELAY | Used to send delayed messages. |
Import procedure
Log on to the ApsaraMQ for RocketMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar, select a region, such as China (Hangzhou). On the Instances page, click the name of the destination instance.
In the left-side navigation pane, click Topics.
In the upper-right corner of the Topics page, click the
icon.Select the .xlsx file and click Open.
In the Import Resources panel, select the topics to import and click Confirm and Import in the Actions column. To import multiple topics at once, select them and click Batch Import.
Verify that the Execution Results column shows Imported for each topic.
Click OK in the lower-left corner of the Import Resources panel.
The imported topics now appear in the topic list of the destination instance.
See also
Export and import group data -- Synchronize group data across instances.
Migrate self-managed Apache RocketMQ clusters to ApsaraMQ for RocketMQ instances -- Move workloads from a self-managed Apache RocketMQ cluster to a managed instance.