activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject [2/3] activemq git commit: https://issues.apache.org/jira/browse/AMQ-5391: use null or empty address to signify anonymous-relay node, in line with expected direction for the Addressing spec underway at OASIS AMQP TC
Date Mon, 24 Nov 2014 15:10:43 GMT
https://issues.apache.org/jira/browse/AMQ-5391: use null or empty address to signify
 anonymous-relay node, in line with expected direction for the Addressing spec
 underway at OASIS AMQP TC


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

Branch: refs/heads/trunk
Commit: 741b739da88a72cc9bb0f8314b6a2e39a60b78da
Parents: 7c1ca63
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Mon Nov 24 15:54:52 2014 +0100
Committer: Dejan Bosanac <dejan@nighttale.net>
Committed: Mon Nov 24 15:54:52 2014 +0100

----------------------------------------------------------------------
 .../transport/amqp/AmqpProtocolConverter.java    | 19 +------------------
 .../activemq/transport/amqp/AmqpWireFormat.java  |  9 ---------
 2 files changed, 1 insertion(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/741b739d/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 3518dbc..566ff71 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
@@ -122,8 +122,6 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
     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");
-    private static final Symbol ANONYMOUS_RELAY = Symbol.valueOf("x-opt-anonymous-relay");
-    private static final Symbol JMS_MAPPING_VERSION = Symbol.valueOf("x-opt-jms-mapping-version");
     private static final Symbol DURABLE_SUBSCRIPTION_ENDED = Symbol.getSymbol("DURABLE_SUBSCRIPTION_ENDED");
 
     private final AmqpTransport amqpTransport;
@@ -154,25 +152,10 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
         this.protonTransport.setChannelMax(CHANNEL_MAX);
 
         this.protonConnection.collect(eventCollector);
-        this.protonConnection.setProperties(getConnectionProperties());
 
         updateTracer();
     }
 
-    /**
-     * Load and return a <code>Map<Symbol, Object></code> that contains
the connection
-     * properties which will allow the client to better communicate with this broker.
-     *
-     * @return the properties that are sent to new clients on connect.
-     */
-    protected Map<Symbol, Object> getConnectionProperties() {
-        Map<Symbol, Object> properties = new HashMap<Symbol, Object>();
-
-        properties.put(ANONYMOUS_RELAY, amqpTransport.getWireFormat().getAnonymousNodeName());
-
-        return properties;
-    }
-
     @Override
     public void updateTracer() {
         if (amqpTransport.isTrace()) {
@@ -857,7 +840,7 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
                 boolean anonymous = false;
                 String targetNodeName = target.getAddress();
 
-                if (targetNodeName != null && targetNodeName.equals(amqpTransport.getWireFormat().getAnonymousNodeName()))
{
+                if ((targetNodeName == null || targetNodeName.length() == 0) && !target.getDynamic())
{
                     anonymous = true;
                 } else if (target.getDynamic()) {
                     dest = createTempQueue();

http://git-wip-us.apache.org/repos/asf/activemq/blob/741b739d/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpWireFormat.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpWireFormat.java
b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpWireFormat.java
index f6c2880..779cb65 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpWireFormat.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpWireFormat.java
@@ -40,7 +40,6 @@ public class AmqpWireFormat implements WireFormat {
     private int version = 1;
     private long maxFrameSize = DEFAULT_MAX_FRAME_SIZE;
     private int maxAmqpFrameSize = NO_AMQP_MAX_FRAME_SIZE;
-    private String anonymousNodeName = "$relay";
 
     @Override
     public ByteSequence marshal(Object command) throws IOException {
@@ -127,12 +126,4 @@ public class AmqpWireFormat implements WireFormat {
     public void setMaxAmqpFrameSize(int maxAmqpFrameSize) {
         this.maxAmqpFrameSize = maxAmqpFrameSize;
     }
-
-    public String getAnonymousNodeName() {
-        return anonymousNodeName;
-    }
-
-    public void setAnonymousNodeName(String anonymousNodeName) {
-        this.anonymousNodeName = anonymousNodeName;
-    }
 }


Mime
View raw message