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 29ed974bc8..d623f4ede0 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 Map that contains the properties + * that this connection supplies to incoming connections. + * + * @return the properties that are offered to the incoming connection. + */ + protected Map getConnetionProperties() { + Map properties = new HashMap(); + + properties.put(QUEUE_PREFIX, "queue://"); + properties.put(TOPIC_PREFIX, "topic://"); + + return properties; + } + @Override public void updateTracer() { if (amqpTransport.isTrace()) {