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.

Debugging

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.

SubscriptionDataList
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.

Examples

Sample requests

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

Sample success responses

XML format

<OnsGroupSubDetailResponse>
  <Data>
        <MessageModel>CLUSTERING</MessageModel>
        <Online>true</Online>
        <SubscriptionDataList>
              <SubscriptionDataList>
                    <SubString>*</SubString>
                    <Topic>test-mq_topic</Topic>
              </SubscriptionDataList>
        </SubscriptionDataList>
        <GroupId>GID_test_group_id</GroupId>
  </Data>
  <RequestId>3364E875-013B-442A-BC3C-C1A84DC60834</RequestId>
</OnsGroupSubDetailResponse>

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"
}

Error codes

For a list of error codes, visit the API Error Center.