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 e64990642c..56a8ecc2c6 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 @@ -2184,7 +2184,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue { txCount = 0; } - List cancelled = scheduledDeliveryHandler.cancel(ref -> filter1.match(ref.getMessage())); + List cancelled = scheduledDeliveryHandler.cancel(ref -> filter1 == null ? true : filter1.match(ref.getMessage())); for (MessageReference messageReference : cancelled) { messageAction.actMessage(tx, messageReference); count++;