mirror of https://github.com/apache/activemq.git
Support the no-local option over AMQP.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1412127 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d350ce6f61
commit
2727496c00
|
@ -59,6 +59,7 @@ class AmqpProtocolConverter {
|
|||
private final AmqpTransport amqpTransport;
|
||||
private static final Symbol COPY = Symbol.getSymbol("copy");
|
||||
private static final Symbol JMS_SELECTOR = Symbol.valueOf("jms-selector");
|
||||
private static final Symbol NO_LOCAL = Symbol.valueOf("no-local");
|
||||
|
||||
public AmqpProtocolConverter(AmqpTransport amqpTransport, BrokerContext brokerContext) {
|
||||
this.amqpTransport = amqpTransport;
|
||||
|
@ -909,6 +910,10 @@ class AmqpProtocolConverter {
|
|||
if( value!=null ) {
|
||||
consumerInfo.setSelector(value.getDescribed().toString());
|
||||
}
|
||||
value = (DescribedType)filter.get(NO_LOCAL);
|
||||
if( value!=null ) {
|
||||
consumerInfo.setNoLocal(true);
|
||||
}
|
||||
}
|
||||
|
||||
sendToActiveMQ(consumerInfo, new ResponseHandler() {
|
||||
|
|
|
@ -35,7 +35,8 @@ public class NoLocalExpression implements BooleanExpression {
|
|||
if (message.isDropped()) {
|
||||
return false;
|
||||
}
|
||||
return !connectionId.equals(message.getMessage().getMessageId().getProducerId().getConnectionId());
|
||||
String messageConnectionId = message.getMessage().getProducerId().getConnectionId();
|
||||
return !connectionId.equals(messageConnectionId);
|
||||
} catch (IOException e) {
|
||||
throw JMSExceptionSupport.create(e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue