Products

Message Queue

2022-02-21 06:21:00

Receive Message

  • Request line
GET {Http Access Point}/v2/messages HTTP/1.1
  • Request headers parameters

Please refer to sections of Common Parameters and Signature-Algorithm for request common parameters.

  • Request Parameters
Field Name Field Type Required Description
topic string Required
consumerGroupId string Required
size int32 Optional The Maximum number of messages to be pulled at a time, 0 < size <=32, defaultValue = 32
consumerId string Optional defaultValue = httpProxyId
consumeFromWhere string Optional for the default starting consumption location, the optional values are: HEAD, TAIL, defaultValue = HEAD
filterExpressionType string Optional for the message filter expression type, the current optional value is only TAG
filterExpression string Optional The message filter expression is not filtered by default, if filtering is required, this parameter and filterExpressionType must be put in at the same time
ack string Optional Whether the server will automatically ACK the message when pulling the message. The ACK must be within the time-out period of the message confirmation reception, the optional values are true and false; when is true, the server will automatically ACK the message consumed, when is false, the client is required to ACK the consumed message, with the default value of defaultValue = false
  • Response Body
  1. Request succeed
Field Name Field Type Description
requestId string The requestId of this request issued to search the call chain
result map The return format is: {"topicName": " lizhijian-041", "ackIndex": " broker-31", "messages": [{"messageId": " messageId_1", "messageBody": " test-0", "properties": {"TAGS":" world"}}, {"messageId": " messageId_2", "messageBody": " test-2", "properties": {"TAGS":" world"}}]}
  1. Request fail
Field Name Field Type Description
requestId string The requestId of this request is used to search the call chain
error map Return format will be: {"code":500,"message":" Topic information query failure","Status":" INTERNAL"}

Description: For sending and receiving Https messages, the interface is the same as Http, except that the Http access point in the request is required to be replaced with an Https access point.

Feedback

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通