gpt4 book ai didi

java - SimpleMessageListenerContainer - 消费者引发异常,如果连接工厂支持,处理可以重新启动

转载 作者:行者123 更新时间:2023-12-02 14:10:48 29 4
gpt4 key购买 nike

我在 springrabbitmq 消费者端不断收到以下警告。它一直在寻找重新启动。

[SimpleAsyncTaskExecutor-3317] WARN  org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer - Consumer raised exception, processing can restart if the connection factory supports it
com.rabbitmq.client.ShutdownSignalException: connection error
at com.rabbitmq.client.impl.AMQConnection.startShutdown(AMQConnection.java:715)
at com.rabbitmq.client.impl.AMQConnection.shutdown(AMQConnection.java:705)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:567)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288)
at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95)
at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:139)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:532)
... 1 more

[SimpleAsyncTaskExecutor-3316] INFO  org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer - Restarting Consumer: tags=[[amq.ctag-0o_AANjD6-IsH8H3MGWNnQ]], channel=Cached Rabbit Channel: AMQChannel, acknowledgeMode=AUTO local queue size=0
2016-02-28 06:06:58,634 334085996 [SimpleAsyncTaskExecutor-3317] INFO org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer - Restarting Consumer: tags=[[amq.ctag-RXsch0v9cjuRlEB-ck1Lvg]], channel=Cached Rabbit Channel: AMQChannel, acknowledgeMode=AUTO local queue size=0
2016-02-28 06:06:58,651 334086013 [SimpleAsyncTaskExecutor-3318] WARN org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer - Consumer raised exception, processing can restart if the connection factory supports it
com.rabbitmq.client.ShutdownSignalException: connection error

最佳答案

如果您看到下面的异常

java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:189) at java.net.SocketInputStream.read(SocketInputStream.java:121) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read(BufferedInputStream.java:265) at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288) at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95) at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:139) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:532)

这意味着您正在关闭消费者,而不是停止它。

关于java - SimpleMessageListenerContainer - 消费者引发异常,如果连接工厂支持,处理可以重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35679505/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com