Querying the Offset of a Consumer Group

Updated on 2025-03-07 GMT+08:00

Function

This API is used to query the offset of a consumer group.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{engine}/{project_id}/instances/{instance_id}/groups/{group}/message-offset

Table 1 Path Parameters

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.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

topic

No

String

Topic name.

partition

No

String

Partition name.

offset

No

String

Offset.

limit

No

String

Maximum value.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

group_message_offsets

Array of GroupMessageOffsetsDetailEntity objects

Consumer group offset details.

total

Integer

Total.

Table 4 GroupMessageOffsetsDetailEntity

Parameter

Type

Description

partition

String

Partition.

message_current_offset

String

Current offset.

message_log_start_offset

Integer

Start offset.

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

Example Responses

Status code: 200

Successful

{
  "group_message_offsets" : [ ],
  "total" : 0
}

Status Codes

Status Code

Description

200

Successful

Error Codes

See Error Codes.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback