Skip to content

Commit 3e8fee1

Browse files
artembilanspring-builds
authored andcommitted
GH-2741: SMLC: Release consumer after its main loop
Fixes: #2741 Apparently the consumer might be in the cancelled state, so `this.activeObjectCounter.release(this);` in the `BlockingQueueConsumer.nextMessage()` is not reachable. (cherry picked from commit 52b68ba)
1 parent cbfccb4 commit 3e8fee1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/SimpleMessageListenerContainer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,7 @@ public void run() { // NOSONAR - line count
13961396
}
13971397
}
13981398
finally {
1399+
SimpleMessageListenerContainer.this.cancellationLock.release(this.consumer);
13991400
if (getTransactionManager() != null) {
14001401
ConsumerChannelRegistry.unRegisterConsumerChannel();
14011402
}

0 commit comments

Comments
 (0)