Closed clChenLiang closed 5 years ago
可以参考使用:
msg.properties.UNIQ_KEY
方法获取
请问 msg.properties
属性是由 阿里云
MQ
服务器确定的吗?
这个功能我没用过。。
延时消息是两条消息
Broker先将消息的 消息的 topic 改成 “SCHEDULE_TOPIC_XXXX”,并把真正的Topic保存在消息的 REAL_TOPIC 属性中。时间到了之后,会将它捞出来,恢复Topic, 并开始写 CommitLog 和 ConsumeQueue。
msg.properties
broker 是可能修改的,或者你发送的时候往 msg 里添加也行
@denghongcai 所以这是正常的了? 这个功能我们貌似没有刻意支持?
@gxcsoccer 恩
使用过程中发送,在
Message
含有 delay 参数的情况下,消费者和生产者各自获取到的msgId
不一致! 测试代码如下:如果将
delay: i
换成delay: 0
则接收到的msgId
一致send
是对producer
封装的一个代码: