activemq-cpp 消息发送到具有 timetolive 属性的队列时接收超时
我使用 activemq 生产者将消息发送到具有“timetolive”属性的队列,然后使用 activemq 消费者函数 receive(long long timeout) 接收消息。收到一些消息后,接收总是超时,无法再次接收任何消息。
当消息没有属性 timetolive 时,它可以很好地工作。
为什么,以及当接收超时时我该怎么办。
版本 ActiveMQ 5.4.2 activemq-cpp 3.2.5
I send a message to the queue with property "timetolive" with activemq producer and then receive with activemq consumer function receive(long long timeout).After receive some messages the receive always timeout and cannot receive any messages again.
It is work well when the message not have property timetolive.
why ,and how can I do when receive timeout.
Version
Activemq 5.4.2
activemq-cpp 3.2.5
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的消息超出了 TTL 值,那么接收调用将不会返回任何内容。您需要设置更长的 TTL,或者确保客户端和服务器计算机上的时钟同步。否则,您需要在此处提供更多信息以帮助诊断问题。
If you messages are exceeding you TTL value then the receive calls won't return anything. You either need to set a longer TTL, or ensure that the clocks are synced on your client and server machines. Otherwise you need to provide more info here to help diagnose the problem.