diff --git a/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java b/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java index 7598d36ee6..8854324ca8 100644 --- a/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/NetworkBridgeFilter.java @@ -58,7 +58,9 @@ public class NetworkBridgeFilter implements DataStructure, BooleanExpression { public boolean matches(MessageEvaluationContext message) throws JMSException{ try{ - return matchesForwardingFilter(message.getMessage()); + //for Queues - the message can be acknowledged and dropped whilst still + //in the dispatch loop + return message.getMessage() != null && matchesForwardingFilter(message.getMessage()); }catch(IOException e){ throw JMSExceptionSupport.create(e); }