Message Retrieval Confirmation API
Function
This API is used to acknowledge consumption of specified messages.
- When a message is being consumed, it remains in the queue. It cannot be consumed again by the same consumer group within 30s since the start of the consumption. If consumption is not acknowledged within this period, MQS determines that this message fails to be consumed, and this message can be consumed again.
- The endpoint is https://{rest_connect_address}:9292. You can query the value of rest_connect_address through a specified instance interface.
URI
POST /v1/topic/{topic_name}/group/{group_name}/messages
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
topic_name |
String |
Yes |
Topic name. |
group_name |
String |
Yes |
Consumer group name. |
Request
Request parameter
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
messages |
Array |
Yes |
Message list. The array size cannot exceed 10 and cannot be null. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
handler |
String |
Yes |
Message handler. |
status |
String |
Yes |
Consumption status. The value can only be success or fail. |
Example request
{ "messages": [ { "handler": "NCMxMDAjMTgjMA==", "status": "success" } ] }
Response
Response parameter
Parameter |
Type |
Description |
---|---|---|
success |
Integer |
Number of consumptions that are successfully acknowledged. |
fail |
Integer |
Number of consumptions that fail to be acknowledged. |
Example response
{ "success": 1, "fail": 0 }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot