码迷,mamicode.com
首页 > 其他好文 > 详细

没有连接的AMQP / RabbitMQ通道何时死亡?(when does an AMQP/RabbitMQ channel with no connections die?)

时间:2020-02-08 11:51:37      阅读:113      评论:0      收藏:0      [点我收藏+]

标签:ref   enc   messages   answering   dom   with   ann   message   using   

 

I have a simple RabbitMQ test program randomly enqueuing messages, and another reading them, all using Spring-AMQP. If the consumer dies (for example killing a process without having a chance to close its connection or channel), any messages that it had not acknowledged appear to remain unacknowledged forever.

I have seen a number of references (for example this question) that say that the channel dies when it has no connections, and that remaining unack‘d messages will be redelivered. That‘s not the behaviour I see - instead I get a growing list of channels marked IDLE and a growing list of connections marked running but with no activity.

Is there some configuration required to notice that connections are dead once the process has been killed?

EDIT: I was running the rabbitmq server inside a VirtualBox VM, which apparently doesn‘t manage dead inbound connections correctly over NAT. This works just fine with the mq server running directly on the physical host.

解决方案

Answering to close. This turns out not to be a real issue.

I was running the rabbitmq server inside a VirtualBox VM, which apparently doesn‘t manage dead inbound connections correctly over NAT. This works just fine with the mq server running directly on the physical host.

问 题

我有一个简单的RabbitMQ测试程序随机排队消息,另一个读取它们,都使用Spring-AMQP。如果消费者死亡(例如,在没有机会关闭其连接或通道的情况下终止进程),则任何未确认的消息似乎永远不会被确认。

我已经看到一些参考文献(例如这个问题),表示该频道在没有连接时会死亡,剩下的就是unack‘d消息将被重新传递。这不是我看到的行为 - 相反,我得到了一个越??来越多的标记IDLE的频道列表,以及越来越多的标记正在运行但没有活动的连接列表。

是否需要一些配置注意一旦进程被杀死,连接就已经死了?

编辑:
我在VirtualBox中运行了rabbitmq服务器VM,显然无法通过NAT正确管理死入站连接。这对于直接在物理主机上运行的mq服务器来说效果很好。

解决方案

回答关闭。事实证明这不是一个真正的问题。

我在VirtualBox VM中运行rabbitmq服务器,显然无法通过NAT正确管理死入站连接。这对于直接在物理主机上运行的mq服务器来说效果很好。

http://www.it1352.com/987062.html






没有连接的AMQP / RabbitMQ通道何时死亡?(when does an AMQP/RabbitMQ channel with no connections die?)

标签:ref   enc   messages   answering   dom   with   ann   message   using   

原文地址:https://www.cnblogs.com/softidea/p/12275556.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!