From 55f4aad761fa64c0e81fdc1a5b3712bd875d386b Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Mon, 13 Nov 2006 19:54:40 +0000 Subject: [PATCH] check that Queue messages aren't acknowledged before applying a filter git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@474469 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/command/NetworkBridgeFilter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }