这是我的rabbitmqctl status:
[{pid,32074},
{running_applications,
[{rabbitmq_management,"RabbitMQ Management Console","3.2.2"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","3.2.2"},
{rabbit,"RabbitMQ","3.2.2"},
{os_mon,"CPO CXC 138 46","2.2.7"},
{rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.2.2"},
{webmachine,"webmachine","1.10.3-rmq3.2.2-gite9359c7"},
{mochiweb,"MochiMedia Web Server","2.7.0-rmq3.2.2-git680dba8"},
{xmerl,"XML parser","1.2.10"},
{inets,"INETS CXC 138 49","5.7.1"},
{mnesia,"MNESIA CXC 138 12","4.5"},
{amqp_client,"RabbitMQ AMQP Client","3.2.2"},
{sasl,"SASL CXC 138 11","2.1.10"},
{stdlib,"ERTS CXC 138 10","1.17.5"},
{kernel,"ERTS CXC 138 10","2.14.5"}]},
{os,{unix,linux}},
{erlang_version,
"Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:32:32] [rq:32] [async-threads:30] [kernel-poll:true]\n"},
{memory,
[{total,1954308048},
{connection_procs,619048024},
{queue_procs,166111144},
{plugins,4423520},
{other_proc,46207032},
{mnesia,44407568},
{mgmt_db,331614464},
{msg_index,6694584},
{other_ets,30005328},
{binary,63825504},
{code,17629100},
{atom,6531121},
{other_system,617810659}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,53967541043},
{disk_free_limit,50000000},
{disk_free,51883839488},
{file_descriptors,
[{total_limit,655260},
{total_used,12659},
{sockets_limit,589732},
{sockets_used,12657}]},
{processes,[{limit,1048576},{used,125740}]},
{run_queue,1},
{uptime,33320350}]我的队伍大部分时间都是空的。但是在我的RabbitMQ中有84440个交易所和8917个队列。
我的问题是,信息可能会延迟很长一段时间,因为我发送它。
我试着从现场得到一些信息。这是我的监视器图表,这是延迟的时间。我们可以看到的是概述,我的交换是fine.But,队列中的消息是延迟传递和确认。



但从我的应用程序日志。
2017-08-10 17:23:08.738 4219 INFO trove.openstack.common.rpc.amqp [-] [ProxyCallback]Received Message with Timestamp:2017-08-10T17:23:08, duration:0.737949s, unique_id:a17186068cae447bbada7a0f24ff45ef17:23消息是在没有delay.And的情况下接收的,然后我将ACK发送回MQ:
2017-08-10 17:23:08.739 4219 DEBUG trove.openstack.common.rpc.common [-] Consume Massage with ACK True虽然我的17:43消息被延迟了215.895117 s,但我真的很困惑。
2017-08-10 17:43:53.895 4219 INFO trove.openstack.common.rpc.amqp [-] [ProxyCallback]Received Message with Timestamp:2017-08-10T17:40:18, duration:215.895117s, unique_id:dc04b94c8fa64978bc9d681b020f4500发布于 2017-09-15 04:05:32
最后,我发现这是我的网络问题。有时消息会在传递中丢失,而RabbitMQ需要很长时间超时并重新尝试消息传递。结果,我的信息延迟了。
该问题源于安全组规则,在900 s不发送数据包后,网关将断开tcp连接而不重置(只是丢弃数据包)。
和系统范围的tcp保持活动(tcp_keepalive_intvl)设置到1200 s。
所以我把tcp_keepalive_intvl和sysctl设为600 s,问题就解决了。
https://stackoverflow.com/questions/45686106
复制相似问题