diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java index 58f31ea889..b9adf33891 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java @@ -2741,6 +2741,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue { if (bindingList.getBindings().isEmpty()) { ActiveMQServerLogger.LOGGER.errorExpiringReferencesNoBindings(expiryAddress); + acknowledge(tx, ref, AckReason.EXPIRED); } else { move(expiryAddress, tx, ref, true, true); } @@ -2751,7 +2752,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue { ActiveMQServerLogger.LOGGER.errorExpiringReferencesNoQueue(name); } - acknowledge(tx, ref); + acknowledge(tx, ref, AckReason.EXPIRED); } }