activemq-cpp 消息发送到具有 timetolive 属性的队列时接收超时

发布于 2024-12-23 09:36:29 字数 240 浏览 2 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深爱不及久伴 2024-12-30 09:36:29

如果您的消息超出了 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文