activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: Add properties to the connection that indicate what the proper destination prefix value should be for Topic or Queue destination types.
Date Fri, 19 Dec 2014 17:27:22 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 9927824c2 -> a09047294


Add properties to the connection that indicate what the proper
destination prefix value should be for Topic or Queue destination types.

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

Branch: refs/heads/trunk
Commit: a090472942df3b61b5a738e20ea6b12034f08dc6
Parents: 9927824
Author: Timothy Bish <tabish121@gmail.com>
Authored: Fri Dec 19 12:26:49 2014 -0500
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Fri Dec 19 12:27:09 2014 -0500

----------------------------------------------------------------------
 .../transport/amqp/AmqpProtocolConverter.java     | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a0904729/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
index 29ed974..d623f4e 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
@@ -121,6 +121,8 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
     private static final byte[] EMPTY_BYTE_ARRAY = new byte[] {};
     private static final int CHANNEL_MAX = 32767;
     private static final Symbol ANONYMOUS_RELAY = Symbol.valueOf("ANONYMOUS-RELAY");
+    private static final Symbol QUEUE_PREFIX = Symbol.valueOf("queue-prefix");
+    private static final Symbol TOPIC_PREFIX = Symbol.valueOf("topic-prefix");
     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");
@@ -157,6 +159,7 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
 
         this.protonConnection.collect(eventCollector);
         this.protonConnection.setOfferedCapabilities(getConnectionCapabilitiesOffered());
+        this.protonConnection.setProperties(getConnetionProperties());
 
         updateTracer();
     }
@@ -171,6 +174,21 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
         return new Symbol[]{ ANONYMOUS_RELAY };
     }
 
+    /**
+     * Load and return a <code>Map<Symbol, Object></code> that contains
the properties
+     * that this connection supplies to incoming connections.
+     *
+     * @return the properties that are offered to the incoming connection.
+     */
+    protected Map<Symbol, Object> getConnetionProperties() {
+        Map<Symbol, Object> properties = new HashMap<Symbol, Object>();
+
+        properties.put(QUEUE_PREFIX, "queue://");
+        properties.put(TOPIC_PREFIX, "topic://");
+
+        return properties;
+    }
+
     @Override
     public void updateTracer() {
         if (amqpTransport.isTrace()) {


Mime
View raw message