Queries the details of consumer groups in a change tracking instance.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeConsumerGroup

The operation that you want to perform. Set this parameter to DescribeConsumerGroup.

SubscriptionInstanceId String Yes dtso5xx5t9u19e****

The ID of the change tracking instance. You can call the DescribeSubscriptionInstances operation to query the instance ID.

RegionId String No cn-hangzhou

The ID of the region where the change tracking instance resides. For more information, see List of supported regions.

PageSize Integer No 30

The number of entries to return on each page. Valid values: 30, 50, and 100. Default value: 30.

PageNum Integer No 1

The number of the page to return. The value must be an integer that is greater than 0 and does not exceed the maximum value of the Integer data type. Default value: 1.

AccountId String No 12323344****

The ID of the Alibaba Cloud account. You do not need to specify this parameter because this parameter will be removed in the future.

Response parameters

Parameter Type Example Description
ConsumerChannels Array of DescribeConsumerChannel

The list of consumer groups.

DescribeConsumerChannel
ConsumerGroupID String dtspis1110z232****

The ID of the consumer group.

ConsumerGroupName String consumergrouptest

The name of the consumer group.

ConsumerGroupUserName String test

The username of the consumer group.

ConsumptionCheckpoint String 2019-10-02T12:00:00Z

The consumption checkpoint, which is the time when the latest data record was consumed by the change tracking client. The format is yyyy-MM-ddTHH:mm:ssZ. The time is displayed in UTC.

MessageDelay Long 172714

The message delay, which is the current time minus the timestamp of the earliest unconsumed message in the change tracking instance. Unit: seconds.

Note If the return value of this parameter is -1, no client is connected to the consumer group.
UnconsumedData Long 186600

The total number of unconsumed messages, which is the number of unconsumed data records plus the number of heartbeat messages.

Note If the return value of this parameter is -1, no client is connected to the consumer group.
ErrCode String InternalError

The error code returned if the call failed.

ErrMessage String The request processing has failed due to some unknown error.

The error message returned if the call failed.

PageNumber Integer 1

The page number of the returned page.

PageRecordCount Integer 30

The maximum number of consumer groups that can be displayed on one page.

RequestId String 4204E899-8193-4D7D-A4FB-3A7F9063****

The ID of the request.

Success String true

Indicates whether the call was successful.

TotalRecordCount Integer 1

The total number of consumer groups.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=DescribeConsumerGroup
&SubscriptionInstanceId=dtso5xx5t9u19e****
&<Common request parameters>

Sample responses

XML format

<DescribeConsumerGroupResponse>
      <TotalRecordCount>1</TotalRecordCount>
      <PageRecordCount>30</PageRecordCount>
      <RequestId>4204E899-8193-4D7D-A4FB-3A7F9063****</RequestId>
      <PageNumber>1</PageNumber>
      <ConsumerChannels>
            <DescribeConsumerChannel>
                  <ConsumptionCheckpoint></ConsumptionCheckpoint>
                  <ConsumerGroupID>dtspis1110z232gbm4</ConsumerGroupID>
                  <ConsumerGroupUserName>test</ConsumerGroupUserName>
                  <ConsumerGroupName>consumergrouptest</ConsumerGroupName>
                  <MessageDelay>-1</MessageDelay>
                  <UnconsumedData>-1</UnconsumedData>
            </DescribeConsumerChannel>
      </ConsumerChannels>
      <Success>true</Success>
</DescribeConsumerGroupResponse>

JSON format

{
    "TotalRecordCount": 1,
    "PageRecordCount": 30,
    "RequestId": "4204E899-8193-4D7D-A4FB-3A7F9063****",
    "PageNumber": 1,
    "ConsumerChannels": {
        "DescribeConsumerChannel": [
            {
                "ConsumptionCheckpoint": "2019-10-02T12:00:00Z",
                "ConsumerGroupID": "dtspis1110z232gbm4",
                "ConsumerGroupUserName": "test",
                "ConsumerGroupName": "consumergrouptest",
                "MessageDelay": -1,
                "UnconsumedData": -1
            }
        ]
    },
    "Success": true
}

Error codes

HttpCode Error code Error message Description
500 InternalError The request processing has failed due to some unknown error. The error message returned because a system error has occurred.

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