1
我在RabbitMQ Java客戶端(我的生產者和消費者相隔很遠)中經常發生Channel shutdown: connection error
問題(24.133.241:5671
線程,名稱被截斷)。大多數情況下,消費者會自動重新啓動,因爲我已啓用心跳(15秒)。然而,有一些情況只有Channel shutdown: connection error
但沒有Consumer raised exception
和Restarting Consumer
(在cTaskExecutor-4
線程下)。AMQP通道關閉但消費者不總是重新啓動
我目前的解決方法是重新啓動我的應用程序。任何人都可以在這個問題上找到一些啓示
2017-03-20 12:42:38.856 ERROR 24245 --- [24.133.241:5671] o.s.a.r.c.CachingConnectionFactory
: Channel shutdown: connection error
2017-03-20 12:42:39.642 WARN 24245 --- [cTaskExecutor-4] o.s.a.r.l.SimpleMessageListenerCont
ainer : Consumer raised exception, processing can restart if the connection factory supports
it
...
2017-03-20 12:42:39.642 INFO 24245 --- [cTaskExecutor-4] o.s.a.r.l.SimpleMessageListenerCont
ainer : Restarting Consumer: tags=[{amq.ctag-4CqrRsUP8plDpLQdNcOjDw=21-05060179}], channel=Ca
ched Rabbit Channel: AMQChannel(amqp://[email protected]:5671/,1), conn: [email protected]
54 Shared Rabbit Connection: [email protected] [delegate=amqp://[email protected]
.241:5671/], acknowledgeMode=NONE local queue size=0
感謝您的回覆。任何現有的rabbitmq設置我可以啓用/調整以減少問題? –
否;正如我所說,這通常是用戶代碼的問題;如果一個聽衆卡住了,那麼注意到框架(或RabbitMQ)可以做到;你需要一個線程轉儲來找出問題所在。 –