You can call this operation to query all topics to which a specified group ID has subscribed. If no consumer instance corresponding to the group ID is online, no data will be found.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes OnsGroupSubDetail

The operation that you want to perform. Set the value to OnsGroupSubDetail.

GroupId String Yes GID_test_group_id

The consumer group ID that you want to query.

InstanceId String Yes MQ_INST_111111111111_DOxxxxxx

The ID of the Message Queue for Apache RocketMQ instance corresponding to the group ID.

Response parameters

Parameter Type Example Description
Data Struct

The returned data object.

GroupId String GID_test_group_id

The queried consumer group ID.

MessageModel String CLUSTERING

The consumption pattern of the consumer group corresponding to the group ID. Valid values:

  • CLUSTERING: clustering consumption
  • BROADCASTING: broadcasting consumption
Online Boolean true

Indicates whether any consumer in the consumer group corresponding to the group ID is online.

SubscriptionDataList Array

Subscription information of the consumer group corresponding to the group ID. No data is returned if all consumers corresponding to the group ID are offline.

SubString String *

The subscription expression of the consumer group.

Topic String test-mq_topic

The name of the topic to which the consumer group has subscribed.

RequestId String 3364E875-013B-442A-BC3C-C1A84DC60834

The ID of the request. This is a common parameter.


Sample requests

http(s)://[Endpoint]/? Action=OnsGroupSubDetail
&<Common request parameters>

Sample success responses

XML format


JSON format

	"Data": {
		"MessageModel": "CLUSTERING",
		"Online": true,
		"SubscriptionDataList": {
			"SubscriptionDataList": [
					"SubString": "*",
					"Topic": "test-mq_topic"
		"GroupId": "GID_test_group_id"
	"RequestId": "3364E875-013B-442A-BC3C-C1A84DC60834"