mirror of https://github.com/apache/activemq.git
guard against MessageEvaluationContext dropping the message whilst doing the check
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@493032 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aebb18cc57
commit
f89d4dcaeb
|
@ -56,11 +56,13 @@ public class NetworkBridgeFilter implements DataStructure, BooleanExpression {
|
|||
}
|
||||
|
||||
|
||||
public boolean matches(MessageEvaluationContext message) throws JMSException{
|
||||
public boolean matches(MessageEvaluationContext mec) throws JMSException{
|
||||
try{
|
||||
//for Queues - the message can be acknowledged and dropped whilst still
|
||||
//in the dispatch loop
|
||||
return message.getMessage() != null && matchesForwardingFilter(message.getMessage());
|
||||
//so need to get the reference to it
|
||||
Message message = mec.getMessage();
|
||||
return message != null && matchesForwardingFilter(message);
|
||||
}catch(IOException e){
|
||||
throw JMSExceptionSupport.create(e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue