调用 QueryDLQMessageByGroupId 接口根据时间范围查询指定 Group 的死信消息。
此接口用于指定时间范围的死信消息查询,即根据 Group ID 和死信消息产生的时间范围,查询该 Group ID 在某段时间内产生的所有死信消息。按时间范围查询时,会筛选出符合条件的消息列表,查询到的死信消息可能较多。
请求频率:该接口请求频率限制为 100 次/秒;单用户请求频率限制为 20 次/秒。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | QueryDLQMessageByGroupId | 要执行的操作,取值:QueryDLQMessageByGroupId。 |
Version | String | 是 | 2023-01-01 | API的版本,取值:2023-01-01。 |
InstanceId | String | 是 | rocketmq-cnai1f0c29ca**** | 实例 ID。 |
GroupId | String | 是 | GID_test | 死信队列对应的的 Group ID。
|
QueryStartTimestamp | String | 是 | 1661320625 | 消息存储时间中的起始时间戳,单位为秒。 |
QueryEndTimestamp | String | 是 | 1661320682 | 消息存储时间中的结束时间戳,单位为秒。 |
PageNumber | Integer | 是 | 1 | 列表的页码,最小值为 1。其中列表中每一页的条目数量固定为 16。 |
Refresh | Boolean | 否 | true | 是否强制刷新。默认值为 false。
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
DLQMessageList | Array of Object | / | 符合查询条件的消息列表。 |
HasMoreMessage | Boolean | true | 是否还有更多页的消息。此值为 true 时,您可以再次调用此接口,翻页查询更多消息。
|
{ "query": {}, "body": { "InstanceId": "rocketmq-cnoe293f2cecb19c", "GroupId": "GID_test", "QueryStartTimestamp": "1694998016", "QueryEndTimestamp": "1695001616", "PageNumber": 1, "PageSize": 10 } }
{ "ResponseMetadata": { "RequestId": "20230918095200BD024B2FD35FF1B8922E", "Action": "QueryDLQMessageByGroupId", "Version": "2023-01-01", "Service": "RocketMQ", "Region": "cn-guilin-boe" }, "Result": { "DLQMessageList": [ { "CreateTimestamp": 1695001604, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A379FA0001", "MessageKey": "", "MessageSize": 500, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001664, "Tag": "" }, { "CreateTimestamp": 1695001604, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A38DF4001B", "MessageKey": "", "MessageSize": 443, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001664, "Tag": "" }, { "CreateTimestamp": 1695001605, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A38AC40017", "MessageKey": "", "MessageSize": 501, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001665, "Tag": "" }, { "CreateTimestamp": 1695001608, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A37C600005", "MessageKey": "", "MessageSize": 448, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001668, "Tag": "" }, { "CreateTimestamp": 1695001608, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A37ECB0008", "MessageKey": "", "MessageSize": 747, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001668, "Tag": "" }, { "CreateTimestamp": 1695001609, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A37AC90002", "MessageKey": "", "MessageSize": 477, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001669, "Tag": "" }, { "CreateTimestamp": 1695001609, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A38396000E", "MessageKey": "", "MessageSize": 453, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001669, "Tag": "" }, { "CreateTimestamp": 1695001610, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A37F990009", "MessageKey": "", "MessageSize": 713, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001671, "Tag": "" }, { "CreateTimestamp": 1695001613, "IsExist": true, "MessageId": "FDBDDC005EA100BE00000000000012133D3418B4AAC259A382CA000D", "MessageKey": "", "MessageSize": 575, "ProducerHost": "100.67.232.179:37920", "ReconsumeTimes": 3, "StoreTimestamp": 1695001673, "Tag": "" }, ], "HasMoreMessage": true } }
公共错误码请参见公共错误码文档。