更新时间:2025-12-24 GMT+08:00

查询消费组消息位点

功能介绍

查询消费组消息位点。

URI

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

表1 路径参数

参数

是否必选

参数类型

描述

engine

String

消息引擎。

project_id

String

项目ID,获取方式请参见获取项目ID

instance_id

String

实例ID。

group

String

消费组名称。

表2 Query参数

参数

是否必选

参数类型

描述

topic

String

topic名称。查询消费组消息位点时必填项。

partition

String

分区名称。

offset

String

偏移值。

limit

String

最大值。

请求参数

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

group_message_offsets

Array of GroupMessageOffsetsDetailEntity objects

消费组消息位点详情

total

Integer

总数

表4 GroupMessageOffsetsDetailEntity

参数

参数类型

描述

partition

String

分区

message_current_offset

String

消息当前位点

topic

String

topic名称

message_log_start_offset

Integer

消息开始位点

lag

Integer

剩余可消费消息数,即消息堆积数

message_log_end_offset

Integer

消息结束位点

consumer_id

String

消费者Id

host

String

host名称

client_id

String

客户端Id

请求示例

查询消费组消息位点

GET https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/groups/{group}/message-offset?topic=topic-189717555

响应示例

状态码:200

查询成功

{
  "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
}

状态码

状态码

描述

200

查询成功

错误码

请参见错误码