1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

update rocketmq docs

This commit is contained in:
fangjian0423
2019-03-13 11:12:00 +08:00
parent 03788b58f9
commit cddf874560
2 changed files with 8 additions and 4 deletions

View File

@@ -152,12 +152,14 @@ RocketMQ Spring framework is an integration of RocketMQ and Spring Boot. It prov
NOTE: RocketMQ Binder Application can also be used to configure rocketmq.** to trigger RocketMQ Spring related AutoConfiguration
The headers defined in `RocketMQHeaders`, which can be set to the header of spring message when sending a message to trigger the RocketMQ related feature:
Currently Binder supports setting the relevant key in `Header` to set the properties of the RocketMQ message.
For example, `TAGS`, `DELAY`, `TRANSACTIONAL_ARG`, `KEYS`, `WAIT_STORE_MSG_OK`, `FLAG` represent the labels corresponding to the RocketMQ message.
```java
MessageBuilder builder = MessageBuilder.withPayload(msg)
.setHeader(RocketMQHeaders.TAGS, "binder")
.setHeader(RocketMQHeaders.MESSAGE_ID, "my-msg-id")
.setHeader(RocketMQHeaders.KEYS, "my-key")
.setHeader("DELAY", "1");
Message message = builder.build();
output().send(message);