Exporting Dead Letter Messages
Function
This API is used to export dead letter messages.
URI
POST /v2/{project_id}/instances/{instance_id}/messages/export
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Instance ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
topic |
No |
String |
Topic name. |
msg_id_list |
No |
Array of strings |
Message ID list. |
uniq_key_list |
No |
Array of strings |
Unique key list. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
[items] |
Array of Message objects |
Message. |
Parameter |
Type |
Description |
---|---|---|
msg_id |
String |
Message ID. |
instance_id |
String |
Instance ID. |
topic |
String |
Topic name. |
store_timestamp |
Number |
Time when the message is stored. |
born_timestamp |
Number |
Time when the message is generated. |
reconsume_times |
Integer |
Number of retry times. |
body |
String |
Message body. |
body_crc |
Number |
Message body checksum. |
store_size |
Number |
Storage size. |
property_list |
Array of property_list objects |
Message attribute list. |
born_host |
String |
IP address of the host that generates the message. |
store_host |
String |
IP address of the host that stores the message. |
queue_id |
Integer |
Queue ID. |
queue_offset |
Integer |
Offset in the queue. |
Example Requests
Exporting dead letter messages with the specified message IDs and keys in the topic
POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/messages/export { "topic" : "%DLQ%group1", "msg_id_list" : [ "C0A8011700002774000000000013B19D", "C0A8011700002774000000000013B30F" ], "uniq_key_list" : [ "7F000001001C18B4AAC26B8AED170010", "7F000001001C18B4AAC26B8AEE030015" ] }
Example Responses
Status code: 200
Dead letter messages exported successfully.
{ "topic" : "topic_01", "body" : "Hello world", "property_list" : { "name" : "ORIGIN_MESSAGE_ID", "value" : "C0A8005B00002775000000000000EBAE" }, "msg_id" : "C0A8005B0000277500000000000133A2", "instance_id" : "56055acb-3c3b-4481-aeab-10464086c2b4", "store_timestamp" : 1662690563020, "born_timestamp" : 1662690324415, "reconsume_times" : 5, "body_crc" : 198614610, "store_size" : 317, "born_host" : "10.58.233.224:63529", "store_host" : "192.168.0.91:10101", "queue_id" : 0, "queue_offset" : 0 }
Status Codes
Status Code |
Description |
---|---|
200 |
Dead letter messages exported successfully. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.