Hybdream95 commented on issue #6533:
URL: https://github.com/apache/rocketmq/issues/6533#issuecomment-1495276005
> @Hybdream95 Can you give more information?
Hello, I have roughly understood the problem of this situation. When sending
the delayed message, he delayed according to the level, rather than according
to the specific delay time.
This is the code I quickly developed and wrote in reference to the 5.0
documentation (the modified part) :
Producer:
Message message = provider.newMessageBuilder()
.setTopic(topic)
// 设置消息Tag,用于消费端根据指定Tag过滤消息。
.setTag("*")
// 消息体。
.setBody(payloads)
.setDeliveryTimestamp(timeStamp)
.build();
//发送延迟消息
CompletableFuture<SendReceipt> sendReceiptCompletableFuture =
producer.sendAsync(message);
The consumer code fully references the documentation。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]