You need to enable JavaScript to run this app.
文档中心
消息队列 RocketMQ版

消息队列 RocketMQ版

复制全文
下载 pdf
死信队列
QueryDLQMessageById - 根据 Message ID 查询 Group 死信消息
复制全文
下载 pdf
QueryDLQMessageById - 根据 Message ID 查询 Group 死信消息
调用 QueryDLQMessageById 接口查询指定 Message ID 的死信消息。
使用说明
此接口用于查询指定 Group ID 下指定 Message ID 的消息。按消息 ID 查询时,可以精确到某一条消息,适用于精确查询的情况。
注意事项
请求频率:该接口请求频率限制为 100 次/秒;单用户请求频率限制为 20 次/秒
调试
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
请求参数
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数
Action string 必选 示例值:QueryDLQMessageById
要执行的操作,取值:QueryDLQMessageById。
Version string 必选 示例值:2023-01-01
API的版本,取值:2023-01-01。
InstanceId string 必选 示例值:rocketmq-cnai1f0c29ca****
实例 ID。
GroupId string 必选 示例值:GID_test
死信队列对应的的 Group ID。
  • 创建 Group 时,消息队列 RocketMQ版会自动为其创建一个对应的死信队列。
  • 一个死信队列对应一个 Group ID, 而不是对应单个消费者实例。一个死信队列包含了对应 Group ID 产生的所有死信消息,不论该消息属于哪个 Topic。
MessageId string 必选 示例值:FDBDDC420003019700000000000000390017014AE5A51A6D2B75****
需要查询的消息 ID。
返回参数
下方仅列出本接口特有的返回参数。更多信息请参见返回结构
DLQMessageInfo object 示例值:/
符合查询条件的消息。
MessageId string 示例值:FDBDDC420003019700000000000000390017014AE5A51A6D2B75****
消息 ID。
IsExist boolean 示例值:true
消息是否仍旧保留在服务端。
  • true:消息存在。
  • false:消息不存在。
Tag string 示例值:FDBD0
消息 Tag。
MessageKey string 示例值:FDBD0
消息 Key。为了避免特殊字符的影响,消息 Key 将会以 Base64 的编码的方式返回,需要通过 Base64 解码后才能查看。
MessageSize integer 示例值:47276
消息大小,单位为 Byte。
ProducerHost string 示例值:100.xx.xx.xx:xxxx
生产者实例地址。
ReconsumeTimes integer 示例值:1
消息重试消费的次数,即手动重发死信消息后,该消息再次进入死信队列的次数。
CreateTimestamp long 示例值:1683784884
消息生成的时间戳,单位为秒。
StoreTimestamp long 示例值:1683784893
消息被服务端存储的时间戳,单位为秒。
请求示例
POST /?Action=QueryDLQMessageById&Version=2023-01-01 HTTP/1.1
Host: rocketmq.cn-beijing.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20260112T103635Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260112/cn-beijing/RocketMQ/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f
{
"InstanceId": "rocketmq-cnai1f0c29ca****",
"GroupId": "GID_test",
"MessageId": "FDBDDC420003019700000000000000390017014AE5A51A6D2B75****"
}
返回示例
{
"ResponseMetadata": {
"RequestId": "20260112183640212079243013CD****",
"Action": "QueryDLQMessageById",
"Version": "2023-01-01",
"Service": "RocketMQ",
"Region": "cn-beijing"
},
"Result": {
"DLQMessageInfo": {
"MessageId": "FDBDDC420003019700000000000000390017014AE5A51A6D2B75****",
"IsExist": true,
"Tag": "FDBD0",
"MessageKey": "FDBD0",
"MessageSize": 47276,
"ProducerHost": "100.xx.xx.xx:xxxx",
"ReconsumeTimes": 1,
"CreateTimestamp": 1683784884,
"StoreTimestamp": 1683784893
}
}
}
错误码
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码
错误码
错误信息
说明
200
OK
OK
成功。
400
OperationDenied_InvalidRequest
The request that you specified is not valid.
请求异常,请检查后重试。
400
InvalidParameter
The specified parameter %s is not valid.
参数值%s无效,请检查后重试。
400
UnsupportedParameter
The specified parameter %s is unsupported.
不支持%s参数。
400
MissingParameter
The request body is missing a required parameter %s.
缺少%s参数。
400
InvalidPara
The specified parameter is not valid.
参数值无效。
403
OperationDenied.VersionUnsupported
The current instance version does not support this operation.Please upgrade the instance and try again.
当前实例版本不支持指定操作,请升级实例后再试。
403
OperationDenied.TaskIsRunning
An operation is currently in progress. Try again later.
后台任务正在运行中,请稍后再试。
403
OperationDenied.InvalidInstanceStatus
The operation is not valid for the current status of the instance.
当前实例状态不允许执行该操作。
403
OperationDenied.ResourceOccupied
The resource is busy now, please try again later.
资源繁忙,可能由于指定资源正在被访问或回收。
403
OperationDenied.AccountNotAuthorized
You are not authorized to perform this operation.
您不具备相关权限,请授权或切换账号后重试。
404
InvalidGroup.NotFound
The specified group does not exist.
Group 不存在。
404
InvalidMessageId.NotFound
The message ID does not exist in the instance %s.
Message ID 不存在。
404
InvalidInstanceId.NotFound
The specified Instance ID does not exist.
实例不存在。
500
InternalError
The request failed due to some unknown error, exception or failure.
内部错误,请稍后再试。
500
ResourceIsBusy
The resource is busy now, please try again later.
资源繁忙,可能由于指定资源正在被访问或回收。
500
ServerInternalError
The request failed due to some unknown error, exception or failure.
服务内部错误。
503
ServiceUnavailable
The request failed due to a temporary failure of the server.
当前服务暂时不可用。
最近更新时间:2026.02.13 18:31:53
这个页面对您有帮助吗?
有用
有用
无用
无用