diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainer.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainer.java index cfdb9cc5ab..5e4ae9ce22 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainer.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainer.java @@ -1396,6 +1396,7 @@ public void run() { // NOSONAR - line count } } finally { + SimpleMessageListenerContainer.this.cancellationLock.release(this.consumer); if (getTransactionManager() != null) { ConsumerChannelRegistry.unRegisterConsumerChannel(); }