Querying the Offset of a Consumer Group
Function
This API is used to query the offset of a consumer group.
URI
GET /v2/{engine}/{project_id}/instances/{instance_id}/groups/{group}/message-offset
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| engine | Yes | String | Message engine. |
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
| instance_id | Yes | String | Instance ID. |
| group | Yes | String | Consumer group name. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| topic | Yes | String | Topic name. Mandatory for querying offset of a consumer group. |
| partition | No | String | Partition name. |
| offset | No | String | Offset. |
| limit | No | String | Maximum value. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| group_message_offsets | Array of GroupMessageOffsetsDetailEntity objects | Consumer group offset details. |
| total | Integer | Total. |
| Parameter | Type | Description |
|---|---|---|
| partition | String | Partition. |
| message_current_offset | String | Current offset. |
| topic | String | Topic name. |
| message_log_start_offset | Integer | Start offset. |
| lag | Integer | Number of remaining messages that can be consumed, that is, the number of accumulated messages. |
| message_log_end_offset | Integer | End offset. |
| consumer_id | String | Consumer ID. |
| host | String | Host name. |
| client_id | String | Client ID. |
Example Requests
Querying the offset of a consumer group
GET https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/groups/{group}/message-offset?topic=topic-189717555 Example Responses
Status code: 200
Successful
{
"group_message_offsets" : [ {
"partition" : 0,
"lag" : 0,
"topic" : "topic-189717555",
"message_current_offset" : 0,
"message_log_start_offset" : 0,
"message_log_end_offset" : 0,
"consumer_id" : "",
"host" : "",
"client_id" : ""
} ],
"total" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Successful |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot