activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [2/4] activemq-artemis git commit: ARTEMIS-641 Enable filtering on address in server consumer
Date Thu, 21 Jul 2016 19:50:28 GMT
ARTEMIS-641 Enable filtering on address in server consumer


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/bed73f57
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/bed73f57
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/bed73f57

Branch: refs/heads/master
Commit: bed73f57b37ee8d2a53a4e4b28d3f5e983b988cd
Parents: fe0cb64
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Wed Jul 20 13:21:53 2016 +0100
Committer: jbertram <jbertram@apache.org>
Committed: Thu Jul 21 14:47:20 2016 -0500

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/api/core/FilterConstants.java  | 6 ++++++
 .../apache/activemq/artemis/core/filter/impl/FilterImpl.java   | 3 +++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bed73f57/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
index 0fbd35f..27aa9b4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
@@ -63,10 +63,16 @@ 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
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bed73f57/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java
index 77bf7c5..f807a18 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java
@@ -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;
       }


Mime
View raw message