
Originally Posted by
Mark Fisher
Great! If there's any way you can take it for a spin in the current state, it would be great to get some feedback. Otherwise, we'll have M3 out soon (hopefully next week).
Thanks,
Mark
Hey, I got pulled into something else for a while, but I came back to this today. Here's what I've found so far.
1) I see that M3 was released, but I didn't get a tag from the repo. It should be on 83f0f48db2471cfcf9035dca4849029924d4f27c.
2) The M3 release doesn't appear to handle simple reconnects, where the RabbitMQ server just restarts, but as of f1d783cf5c09b16c06263b2a1475ef12658aa3ef (latest as of this morning), it does reconnect when I restart RabbitMQ.
3) Even with reconnects working, if the server comes up and the queue I'm trying to receive from doesn't exist--e.g. it wasn't durable and hasn't yet been recreated--the reconnect attempts stop. The trace-level logs and stacktrace for when this happens are below.
I'm going to keep looking and poking at this for a while.
Code:
12:58:29,694 INFO Restarting Consumer: tag=[null], channel=null, acknowledgeMode=AUTO local queue size=0 [SimpleAsyncTaskExecutor-3] SimpleMessageListenerContainer
12:58:29,695 DEBUG Closing Rabbit Channel: null [SimpleAsyncTaskExecutor-3] BlockingQueueConsumer
12:58:29,698 DEBUG Detected closed connection. Opening a new one before creating Channel. [SimpleAsyncTaskExecutor-4] CachingConnectionFactory
12:58:29,721 ERROR Consumer received fatal exception on startup [SimpleAsyncTaskExecutor-4] SimpleMessageListenerContainer
org.springframework.amqp.rabbit.listener.ListenerStartupFatalException: Cannot prepare queue for listener. Either the queue doesn't exist or the broker will not allow us to use it.
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:156)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:471)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:107)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:131)
at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:624)
at com.rabbitmq.client.impl.ChannelN.queueDeclarePassive(ChannelN.java:59)
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:153)
... 2 more
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=404,reply-text=NOT_FOUND - no queue 'hello' in vhost '/',class-id=50,method-id=10),null,""}
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:328)
at com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:201)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:125)
... 5 more
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=404,reply-text=NOT_FOUND - no queue 'hello' in vhost '/',class-id=50,method-id=10),null,""}
at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:365)
at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:235)
at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:151)
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:96)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:446)
12:58:29,729 DEBUG Cancelling Consumer: tag=[null], channel=AMQChannel(amqp://guest@dev-tomcat:5672/,1), acknowledgeMode=AUTO local queue size=0 [SimpleAsyncTaskExecutor-4] SimpleMessageListenerContainer
12:58:29,729 DEBUG Closing Rabbit Channel: AMQChannel(amqp://guest@dev-tomcat:5672/,1) [SimpleAsyncTaskExecutor-4] BlockingQueueConsumer
12:58:29,730 DEBUG Shutting down Rabbit listener container [SimpleAsyncTaskExecutor-4] SimpleMessageListenerContainer
12:58:29,731 DEBUG Waiting for workers to finish. [SimpleAsyncTaskExecutor-4] SimpleMessageListenerContainer
12:58:29,731 INFO Successfully waited for workers to finish. [SimpleAsyncTaskExecutor-4] SimpleMessageListenerContainer