更新时间:2024-01-30 GMT+08:00
分享

查询分区指定偏移量的消息

当前页面API为历史版本API,未来可能停止维护。

URI

GET /v1.0/{project_id}/instance/{instance_id}/manage/topic/{topic_name}/partition/{partition}/offset/{offset}/message

参数说明见表1

表1 参数说明

参数

类型

必选

说明

project_id

String

项目ID。

instance_id

String

实例ID。

topic_name

String

topic名称。

partition

Integer

分区编号。取值范围:0~19。

offset

String

消息位置。

请求消息

请求参数

请求示例

无。

响应消息

响应参数

参数说明见表2

表2 响应参数说明

参数

类型

说明

message

object of message

消息列表,见表表3

表3 message参数

参数

类型

说明

key

String

消息的key。

value

String

消息内容。

topic

String

Topic名称。

partition

Integer

分区编号。

message_offset

Long

消息位置。

size

Integer

消息大小,单位字节。

timestamp

Long

消息时间戳。

响应示例

{
    "message": 
        {
            "topic": "mytest",
            "partition": 0,
            "message_offset": 7,
            "key": null,
            "value": "kasjdf",
            "size": 6,
            "timestamp": 1568125036045
        }
}
分享:

    相关文档

    相关产品