Updated on 2026-10-29 GMT+08:00

Exporting RocketMQ Metadata

Function

This API is used to export RocketMQ metadata.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

GET /v2/{project_id}/rocketmq/instances/{instance_id}/metadata-export

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID. To obtain it, call the API for querying all instances.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

export_time

Integer

Definition

Export timestamp.

Range

N/A

topic_config_table

Map<String,MetadataTopicConfig>

Definition

Topic metadata. The key is the topic name, and the value is the topic configuration.

subscription_group_table

Map<String,MetadataSubscriptionGroup>

Definition

Consumer group metadata. The key is the consumer group name, and the value is the consumer group configuration.

Table 3 MetadataTopicConfig

Parameter

Type

Description

order

Boolean

Definition

Whether the messages are ordered messages.

Range

  • true: The messages are ordered messages.

  • false: The messages are not ordered messages.

perm

Integer

Definition

Topic permissions.

Range

  • 2: subscription permissions.

  • 4: publish permissions.

  • 6: publish and subscription permissions.

attributes

attributes object

Definition

Extended attributes.

read_queue_nums

Integer

Definition

Number of read queues.

Range

N/A

topic_name

String

Definition

Topic name.

Range

N/A

topic_filter_type

String

Definition

Topic filtering type.

Range

  • SINGLE_TAG: single tag.

  • MULTI_TAG: multiple tags.

topic_sys_flag

Integer

Definition

Topic system flag.

Range

N/A

write_queue_nums

Integer

Definition

Number of write queues.

Range

N/A

Table 4 attributes

Parameter

Type

Description

message.type

String

Definition

Message type.

Range

  • NORMAL: normal messages.

  • DELAY: scheduled messages.

  • FIFO: first-in, first-out (FIFO) messages.

  • TRANSACTION: transactional messages.

Table 5 MetadataSubscriptionGroup

Parameter

Type

Description

broker_id

Integer

Definition

Broker ID.

Range

N/A

consume_broadcast_enable

Boolean

Definition

Whether to allow broadcast consumption.

Range

  • true: Broadcast consumption is allowed.

  • false: Broadcast consumption is not allowed.

consume_enable

Boolean

Definition

Whether to allow consumption.

Range

  • true: Consumption is allowed.

  • false: Consumption is not allowed.

consume_from_min_enable

Boolean

Definition

Whether to enable consumption from the minimum offset.

Range

  • true: yes.

  • false: no.

group_name

String

Definition

Consumer group name.

Range

N/A

notify_consumer_ids_changed_enable

Boolean

Definition

Whether to notify consumer ID changes.

Range

  • true: yes.

  • false: no.

retry_max_times

Integer

Definition

Maximum number of retries.

Range

1–16

retry_queue_nums

Integer

Definition

Number of retry queues.

Range

N/A

which_broker_when_consume_slow

Integer

Definition

ID of the broker selected for slow consumption.

Range

N/A

consume_message_orderly

Boolean

Definition

Whether to enable orderly consumption.

Range

  • true: yes.

  • false: no.

attributes

Map<String,String>

Definition

Extended attribute (key-value pair).

Example Requests

Exporting RocketMQ metadata

GET https://{endpoint}/v2/{project_id}/rocketmq/instances/{instance_id}/metadata-export

Example Responses

Status code: 200

{
  "export_time" : 1780299372600,
  "topic_config_table" : {
    "topic-443036272" : {
      "order" : false,
      "perm" : 6,
      "attributes" : {
        "message.type" : "DELAY"
      },
      "read_queue_nums" : 4,
      "topic_filter_type" : "SINGLE_TAG",
      "topic_name" : "topic-443036272",
      "topic_sys_flag" : 0,
      "write_queue_nums" : 4
    }
  },
  "subscription_group_table" : {
    "test" : {
      "broker_id" : 0,
      "consume_broadcast_enable" : true,
      "consume_enable" : true,
      "consume_from_min_enable" : true,
      "group_name" : "test",
      "notify_consumer_ids_changed_enable" : true,
      "retry_max_times" : 16,
      "retry_queue_nums" : 1,
      "which_broker_when_consume_slow" : 1,
      "consume_message_orderly" : false,
      "attributes" : { }
    }
  }
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.