zoukankan      html  css  js  c++  java
  • 没有连接的AMQP / RabbitMQ通道何时死亡?(when does an AMQP/RabbitMQ channel with no connections die?)

    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






  • 相关阅读:
    -Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.
    map合并,相同键对应的值相加
    oracle截取字符串去掉字段末尾指定长度的字符
    springMVC结合AjaxForm上传文件
    hibernate中指定非外键进行关联
    Maven安装及MyEclipse中使用Maven
    js判断字符串出现的次数
    PL/SQL如何调试sql语句、存储过程
    如何让pl/sql developer记住密码,实现快速登录
    【学亮IT手记】jQuery each()函数用法实例
  • 原文地址:https://www.cnblogs.com/softidea/p/12275556.html
Copyright © 2011-2022 走看看