ARTEMIS-641 Enable filtering on address in server consumer

This commit is contained in:
Martyn Taylor 2016-07-20 13:21:53 +01:00 committed by jbertram
parent fe0cb648d6
commit bed73f57b3
2 changed files with 9 additions and 0 deletions

View File

@ -62,11 +62,17 @@ public final class FilterConstants {
*/
public static final SimpleString ACTIVEMQ_SIZE = new SimpleString("AMQSize");
/**
* Name of the ActiveMQ Artemis Address header
*/
public static final SimpleString ACTIVEMQ_ADDRESS = new SimpleString("AMQAddress");
/**
* All ActiveMQ Artemis headers are prepended by this prefix.
*/
public static final SimpleString ACTIVEMQ_PREFIX = new SimpleString("AMQ");
private FilterConstants() {
// Utility class
}

View File

@ -169,6 +169,9 @@ public class FilterImpl implements Filter {
else if (FilterConstants.ACTIVEMQ_SIZE.equals(fieldName)) {
return msg.getEncodeSize();
}
else if (FilterConstants.ACTIVEMQ_ADDRESS.equals(fieldName)) {
return msg.getAddress();
}
else {
return null;
}