Hello all,<div><br></div><div>I'm getting the a double ack (I believe) error when the rabbitmq consumer dies and error recovery begins to happen : </div><div><br></div><div><div>12:37:10.625 [SimpleAsyncTaskExecutor-1] WARN o.s.a.r.l.SimpleMessageListenerContainer - Consumer failed irretrievably on restart. class org.springframework.amqp.AmqpIOException: java.io.IOException</div><div>Exception in thread "SimpleAsyncTaskExecutor-1" org.springframework.amqp.AmqpIOException: java.io.IOException</div><div>at org.springframework.amqp.rabbit.connection.RabbitUtils.convertRabbitAccessException(RabbitUtils.java:109)</div><div>at org.springframework.amqp.rabbit.connection.RabbitUtils.closeMessageConsumer(RabbitUtils.java:136)</div><div>at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.stop(BlockingQueueConsumer.java:210)</div><div>at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.restart(SimpleMessageListenerContainer.java:379)</div><div>at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1300(SimpleMessageListenerContainer.java:56)</div><div>at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:551)</div><div>at java.lang.Thread.run(Thread.java:679)</div><div>Caused by: java.io.IOException</div><div>at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:107)</div><div>at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:840)</div><div>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</div><div>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div>at java.lang.reflect.Method.invoke(Method.java:616)</div><div>at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:298)</div><div>at $Proxy125.basicCancel(Unknown Source)</div><div>at org.springframework.amqp.rabbit.connection.RabbitUtils.closeMessageConsumer(RabbitUtils.java:123)</div><div>... 5 more</div><div>Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 1, class-id=60, method-id=80),null,""}</div><div>at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67)</div><div>at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33)</div><div>at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:328)</div><div>at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:837)</div><div>... 12 more</div></div><div><br></div><div><br></div><div><br></div><div>Now, i'm not sure what I need to do to ensure that i'm acknowledging only once ? I'm not extremely familiar with spring-rabbit though i've looked through the documentation to see if there are any pointers. Can someone point me in the right direction ? My spring-rabbit config shown below : </div><div><br></div><div><pre style="margin-bottom: 10px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-size: 14px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; color: rgb(0, 0, 0); line-height: 18px; text-align: left; "><code style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; "><rabbit:connection-factory id="connectionFactory" host="${rabbitmq.host:rserver1}" port="${rabbitmq.port:5672}"
username="guest" password="guest" />
<rabbit:template id="amqpTemplate" connection-factory="connectionFactory" />
<rabbit:admin connection-factory="connectionFactory" />
<rabbit:queue name="Q1.${server.name:unknown}" />
<rabbit:queue name="Q2.${server.name:unknown}" />
<rabbit:listener-container connection-factory="connectionFactory">
<rabbit:listener queues="Q2.${server.name:unknown}" ref="q1QueueConsumer" />
<rabbit:listener queues="Q2.${server.name:unknown}" ref="q2QueueConsumer" />
</rabbit:listener-container>
<rabbit:topic-exchange name="Exchange">
<rabbit:bindings>
<rabbit:binding queue="Q1.${server.name:unknown}" pattern="#.Q1.#" />
<rabbit:binding queue="Q2.${server.name:unknown}" pattern="#.Q2.#" />
</rabbit:bindings>
</rabbit:topic-exchange></code></pre></div>