Skip to content

Commit 0b8ca3a

Browse files
author
Marco Cozzi
committed
GH-3079: allow sending ACKs within the ShutdownTimeout period
Signed-off-by: Marco Cozzi <[email protected]>
1 parent 87d4d75 commit 0b8ca3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ public void rollbackOnExceptionIfNecessary(Throwable ex, long tag) {
888888

889889
/**
890890
* Perform a commit or message acknowledgement, as appropriate.
891-
* NOTE: This method was never been intended tobe public.
891+
* NOTE: This method was never intended to be public.
892892
* @param localTx Whether the channel is locally transacted.
893893
* @param forceAck perform {@link Channel#basicAck(long, boolean)} independently of {@link #acknowledgeMode}.
894894
* @return true if at least one delivery tag exists.
@@ -909,7 +909,7 @@ boolean commitIfNecessary(boolean localTx, boolean forceAck) {
909909
try {
910910
boolean ackRequired = forceAck || (!this.acknowledgeMode.isAutoAck() && !this.acknowledgeMode.isManual());
911911

912-
if (ackRequired && (!this.transactional || (isLocallyTransacted && !cancelled()))) {
912+
if (ackRequired && (!this.transactional || isLocallyTransacted)) {
913913
OptionalLong deliveryTag = this.deliveryTags.stream().mapToLong(l -> l).max();
914914
deliveryTag.ifPresent((tag) -> {
915915
try {

0 commit comments

Comments
 (0)