You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Hybdream95 (via GitHub)" <gi...@apache.org> on 2023/04/04 03:02:18 UTC
[GitHub] [rocketmq] Hybdream95 commented on issue #6533: rocketmq5.0 sent delayed messages and found the delay time to be inaccurate
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org