This API is used to get a consumer group cursor.
GET /consumergroupcursor?topic_id=xxxx-xx-xx-xx-xxxx&consumer_group=cls_demo_consumer_group&partition_id=1 HTTP/1.1
Host: <Region>.cls.tencentyun.com
Authorization: <AuthorizationString>
There are only common request headers but no special request headers.
Field Name | Type | Location | Required | Description |
---|---|---|---|---|
topic_id | string | query | Yes | Log topic ID of consumer group |
consumer_group | string | query | Yes | Consumer group name |
partition_id | int | query | No | Topic partition number (if this parameter is not specified, cursors of all partitions under the topic will be returned) |
Response packet if partition_id
is not specified:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 123
{
"cursors":[
{
"consumer_id":"cls-demo_consumer_id",
"cursor":"FAjUjMtmELBovQRogYkBuq",
"partition_id":1,
"update_time":1573645058
},
{
"consumer_id":"cls-demo_consumer_id",
"cursor":"FAjUjMtmELBovQRogYkBuqg",
"partition_id":2,
"update_time":1573645058
}
]
}
Response packet if partition_id
is specified:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 123
{
"consumer_id":"cls-demo_consumer_id",
"cursor":"FAjUjMtmELBovQRog",
"partition_id":1,
"update_time":1573645058
}
There are only common response headers but no special response headers.
Field Name | Type | Required | Description |
---|---|---|---|
partition_id | string | Yes | Topic partition number |
cursor | string | Yes | Cursor value |
update_time | long long | Yes | Cursor update time |
consumer_id | string | Yes | Consumer ID assigned to this partition |
For more information, please see Error Codes.
Was this page helpful?