查询分区指定时间段的消息
当前页面API为历史版本API,未来可能停止维护。
URI
GET /v1.0/{project_id}/instances/{instance_id}/manage/topics/{topic}/messages?partition={partition}&start_time={start_time}&end_time={end_time}&limit={limit}&offset={offset}
参数说明请参考表1
请求消息
请求参数
无
请求示例
无。
响应消息
响应参数
参数说明见表2。
|
参数 |
类型 |
说明 |
|---|---|---|
|
messages |
Array<Object> |
消息列表,见表3。 |
|
messages_count |
Long |
消息总数。 |
|
offsets_count |
Integer |
总页数。 |
|
offset |
Integer |
当前页数。 |
|
参数 |
类型 |
说明 |
|---|---|---|
|
topic |
String |
topic名称。 |
|
partition |
Integer |
分区编号。 |
|
message_offset |
Long |
消息编号。 |
|
size |
Integer |
消息大小,单位字节。 |
|
timestamp |
Long |
消息时间戳。 |
响应示例
{
"messages": [
{
"topic": "mytest",
"partition": 0,
"message_offset": 7,
"size": 6,
"timestamp": 1568125036045
}
],
"messages_count": 1,
"offsets_count": 1,
"offset": 1
}