https://cmq-gz.publicXXX.tencenttdmq.com
http://gz.mqadapter.cmq.tencentyun.com
Parameter | Required | Type | Description |
topicName | Yes | String | Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter. |
msgBody.n | Yes | String | Message body, which represents a message in the batch. Currently, a batch can contain up to 16 messages. For ease of use, n can start from either 0 or 1, but the values must be consecutive. For example, two messages to be sent can be represented by msgBody.0, msgBody.1 or msgBody.1, msgBody.2 . Note: As the total size of all messages ( msgBody only, excluding message headers and other parameters) cannot exceed 64 KB, we recommend you plan the number of messages to be sent in advance. |
msgTag.n | No | String | Message filter tag (used for message filtering). The number of tags cannot exceed five, and each tag can contain up to 16 characters. This parameter is used in conjunction with the filterTag parameter of the Subscribe API. Rules: (1) If filterTag is not configured, no matter whether msgTag is configured, the subscription will receive all messages published to the topic;(2) If the filterTag array has a value, only when at least one of the values in the array also exists in the msgTag array (i.e., filterTag and msgTag have an intersection) can the subscription receive messages published to the topic; (3) If the filterTag array has a value, but msgTag is not configured, then no messages published to the topic will be received, which can be considered as a special case of rule 2 because filterTag and msgTag do not intersect in this case. The overall design idea of rules is based on the intention of the subscriber. |
routingKey | No | String | This parameter can contain up to 64 bytes to represent the route for message sending. It can have up to 15 dots (namely up to 16 segments). When a message is sent to an exchange of the topic type, the specified routingKey must meet the format requirements as described above. A message with a routingkey specified by the subscriber will be pushed to all consumers that match the BindingKey . There are two matching relationships: 1. * (asterisk) represents a word (a letter string); 2. # (hashtag) matches one or multiple characters. |
Parameter | Type | Description |
code | Int | |
message | String | Error message. |
requestId | String | Request ID generated by the server, which can be submitted to the backend for troubleshooting when an internal server error occurs. |
msgList | Array | List of unique IDs of the messages generated by the server. Each element indicates the information of one message. |
msgList
is defined as follows:Parameter | Type | Description |
msgId | String | Unique ID of the message generated by the server. |
https://domain/v2/index.php?Action=BatchPublishMessage&topicName=test-topic-123&msgBody.1=helloworld1&msgBody.2=helloworld2&<Common request parameters>
{"code" : 0,"message" : "","requestId":"14534664555","msgList":[{"msgId":"123345346"},{"msgId":"456436346"}]}
Was this page helpful?