Queries the information of a consumer group, including the consumer group ID, consumer group name, username, and message delay.

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 DescribeConsumerChannel

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

RegionId String Yes cn-hangzhou

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

DtsInstanceId String No dtsboss6pn1w******

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

Note You must specify at least one of the DtsInstanceId and DtsJobId. parameters.
DtsJobId String No boss6pn1w******

The ID of the change tracking task. You can call the DescribeDtsJobs operation to query the task ID.

Note You must specify at least one of the DtsInstanceId and DtsJobId. parameters.
PageSize Integer No 20

The number of entries to return on each page. Valid values: 1 to 100. Default value: 20.

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

Response parameters

Parameter Type Example Description
ConsumerChannels Array of ConsumerChannel

The list of consumer groups.

ConsumerGroupId String dtsor2y66j4219****

The ID of the consumer group.

ConsumerGroupName String Consumer Group A

The name of the consumer group.

ConsumerGroupUserName String dtstest

The username of the consumer group.

ConsumptionCheckpoint String 2021-06-20T12:00:00Z

The consumption checkpoint, which is the time when the latest data record was consumed by the change tracking client. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format 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. The value is a UNIX timestamp. 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.

HttpStatusCode String 200

The HTTP status code.

PageNumber Integer 1

The page number of the returned page.

PageRecordCount Integer 20

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

RequestId String D66140B3-C747-42B6-8315-BAF6490E****

The ID of the request.

Success String true

Indicates whether the call was successful.

TotalRecordCount Long 1

The total number of consumer groups.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=DescribeConsumerChannel
&RegionId=cn-hangzhou
&DtsInstanceId=dtsboss6pn1w******

Sample success responses

XML format

<DescribeConsumerChannelResponse>
      <TotalRecordCount>1</TotalRecordCount>
      <PageRecordCount>20</PageRecordCount>
      <RequestId>D66140B3-C747-42B6-8315-BAF6490E****</RequestId>
      <PageNumber>1</PageNumber>
      <HttpStatusCode>200</HttpStatusCode>
      <ConsumerChannels>
            <ConsumptionCheckpoint></ConsumptionCheckpoint>
            <ConsumerGroupId>dtsor2y66j4219****</ConsumerGroupId>
            <ConsumerGroupUserName>dtstest</ConsumerGroupUserName>
            <ConsumerGroupName>Consumer Group A</ConsumerGroupName>
            <MessageDelay>-1</MessageDelay>
            <UnconsumedData>-1</UnconsumedData>
      </ConsumerChannels>
      <Success>true</Success>
</DescribeConsumerChannelResponse>

JSON format

{
	"TotalRecordCount": 1,
	"PageRecordCount": 20,
	"RequestId": "D66140B3-C747-42B6-8315-BAF6490E****",
	"PageNumber": 1,
	"HttpStatusCode": 200,
	"ConsumerChannels": [
		{
			"ConsumptionCheckpoint": "",
			"ConsumerGroupId": "dtsor2y66j4219****",
			"ConsumerGroupUserName": "dtstest",
			"ConsumerGroupName": "Consumer Group A",
			"MessageDelay": -1,
			"UnconsumedData": -1
		}
	],
	"Success": true
}

Error codes

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