Send message to Queue, cannot send message to Dead Letter Queue.
Message content, the message body
Delay time
After the message enters the queue, it becomes visible after a delay, thereby being received by the user
If the value is not set, it uses the value set in the Queue
Queue Default Value: 0
Legal Range: [0, 900]
Invisible time
After the message is received by the user, if not deleted by the user in time, it will be changed to visible after the invisible time
If no value is set, it uses the value set in the Queue
Queue Default Value: 30
Legal Range: [2, 43200]
Message with user-defined attribute Map
The attribute name is String type, and the attribute value is MessageAttribute type
The size of these attributes is also included in the message's overall size, which is commonly limited by the Queue attribute messageMaximumBytes
.
Fields of type MessageAttribute type include:
Type is the type of attribute, currently supports both <string and binary
Users can append their own subtypes after type, such as string.Number
,binary.File
. Subtypes Transparent to EMQ Services
If type starts with string, it is considered to be of type string, if it starts with binary, it is of type binary. Type can only contain numbers, letters, and periods
stringValue and binaryValue cannot be empty at the same time, and must correspond to type type
For example, if you want to include a picture in the message, you can set the type to binary.JPEG
and set the binaryValue to the data of the picture.
Note: DLQ.sourceQueue is a user attribute keyword reserved by the system. Users cannot customize the attributes of this name.
Message topic, defaults to empty
See topicqueue for details
The priority of the Message; the default is 8, the range is [1, 16]. The priority of the message takes effect only when the Queue is set to allow message priority. See PriorityQueue for details
The string used to uniquely identify the message. The messageID of different messages in the same Queue will not be the same
The length of the Message body. That includes only the length of the messageBody
Message body MD5 checksum
The timestamp of the message arriving at the EMQ server
Send multiple messages to the Queue at once (usually no more than 10) This operation is currently an atomic operation by default. That is, multiple send messages either succeed at the same time or fail at the same time
For the send message list, every element is one message
SendMessageBatchRequestEntry specifically includes:
Among which the entryId is used to uniquely identify a message in the entire list, so it cannot be empty or repeated. The return value of the method will use this entryId to index the return information for each message
The meaning of the remaining fields is the same as the corresponding field in SendMessageRequest
The topic of all messages in the request defaults to empty
(In this operation, the topic of all messages must be the same)
See TopicQueue for details
Successful send message return information
SendMessageBatchResponseEntry type includes the following specific fields:
Among which the entryId corresponds to the entryId in the SendMessageBatchRequestEntry
type, and the remaining fields have the same meaning as the corresponding fields in SendMessageResponse
.