未验证 提交 4e73ba0e 编写于 作者: S Shang Yehua 提交者: GitHub

docs(example): change delay start point (#2586)

As the test results showed, the message delay period starts from the bornTimestamp, not from storeTimestamp
Co-authored-by: NYehua Shang <niceshang@outlook.com>
上级 908782f0
...@@ -446,7 +446,7 @@ public class ScheduledMessageConsumer { ...@@ -446,7 +446,7 @@ public class ScheduledMessageConsumer {
public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> messages, ConsumeConcurrentlyContext context) { public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> messages, ConsumeConcurrentlyContext context) {
for (MessageExt message : messages) { for (MessageExt message : messages) {
// Print approximate delay time period // Print approximate delay time period
System.out.println("Receive message[msgId=" + message.getMsgId() + "] " + (System.currentTimeMillis() - message.getStoreTimestamp()) + "ms later"); System.out.println("Receive message[msgId=" + message.getMsgId() + "] " + (System.currentTimeMillis() - message.getBornTimestamp()) + "ms later");
} }
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册