All Products
Search
Document Center

OnsDLQMessageGetById

Last Updated: Apr 09, 2019

OnsDLQMessageGetById

You can call this operation to query a specific dead-letter message by setting its message ID. The information that is queried includes the storage time, message body, message key, tag, and other attributes of the dead-letter message.

Description

An exact query is implemented if you query dead-letter messages by using the message ID. You can obtain the message ID that is required for the query by calling SendResult if the message has been sent or by calling the batch query method.

Request parameters

Name Type Required Description
PreventCache Long Yes The parameter that is used for CSRF verification, which can be set to the current system time. Unit: ms
InstanceId String Yes The ID of the instance for the message that you want to query.
GroupId String Yes The consumer group ID of the message that you want to query.
MsgId String Yes The ID of the message that you want to query (message ID).

Response parameters

Name Type Description
RequestId String A common parameter. Each request has a unique ID.
HelpUrl String A help link.
Data Data The query results.

Fields in Data

Name Type Description
Topic String The topic of the message.
PropertyList List(MessageProperty) A list of message properties.
Body String The message body.
StoreSize Integer The message size.
BornTimestamp Long The time when the message was generated.
BornHost String The producer that generated the message.
StoreTimestamp Long The time when the broker stored the message.
StoreHost String The broker that stored the message.
MsgId String The message ID.
BodyCRC Integer The message body CRC.
ReconsumeTimes Integer The number of message consumption retries.

Examples

For more information about sample codes, see API sample code and endpoints.