You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2016/08/30 19:01:35 UTC
activemq git commit: https://issues.apache.org/jira/browse/AMQ-6410
Repository: activemq
Updated Branches:
refs/heads/master a4cd4dc67 -> 4a1f2f7ca
https://issues.apache.org/jira/browse/AMQ-6410
Advertise that the connection supported delayed message delivery.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/4a1f2f7c
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/4a1f2f7c
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/4a1f2f7c
Branch: refs/heads/master
Commit: 4a1f2f7ca73fc3cf8d650a4d1b884bc6a0750e59
Parents: a4cd4dc
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Aug 30 15:00:23 2016 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Aug 30 15:00:23 2016 -0400
----------------------------------------------------------------------
.../java/org/apache/activemq/transport/amqp/AmqpSupport.java | 1 +
.../apache/activemq/transport/amqp/protocol/AmqpConnection.java | 3 ++-
.../activemq/transport/amqp/interop/AmqpConnectionsTest.java | 5 +++++
3 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/4a1f2f7c/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpSupport.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpSupport.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpSupport.java
index cf86f01..9087cf1 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpSupport.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpSupport.java
@@ -51,6 +51,7 @@ public class AmqpSupport {
// Symbols used to announce connection information to remote peer.
public static final Symbol ANONYMOUS_RELAY = Symbol.valueOf("ANONYMOUS-RELAY");
+ public static final Symbol DELAYED_DELIVERY = Symbol.valueOf("DELAYED_DELIVERY");
public static final Symbol QUEUE_PREFIX = Symbol.valueOf("queue-prefix");
public static final Symbol TOPIC_PREFIX = Symbol.valueOf("topic-prefix");
public static final Symbol CONNECTION_OPEN_FAILED = Symbol.valueOf("amqp:connection-establishment-failed");
http://git-wip-us.apache.org/repos/asf/activemq/blob/4a1f2f7c/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java
index aa9b577..929fa24 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java
@@ -19,6 +19,7 @@ package org.apache.activemq.transport.amqp.protocol;
import static org.apache.activemq.transport.amqp.AmqpSupport.ANONYMOUS_RELAY;
import static org.apache.activemq.transport.amqp.AmqpSupport.CONNECTION_OPEN_FAILED;
import static org.apache.activemq.transport.amqp.AmqpSupport.CONTAINER_ID;
+import static org.apache.activemq.transport.amqp.AmqpSupport.DELAYED_DELIVERY;
import static org.apache.activemq.transport.amqp.AmqpSupport.INVALID_FIELD;
import static org.apache.activemq.transport.amqp.AmqpSupport.PLATFORM;
import static org.apache.activemq.transport.amqp.AmqpSupport.PRODUCT;
@@ -186,7 +187,7 @@ public class AmqpConnection implements AmqpProtocolConverter {
* @return the capabilities that are offered to new clients on connect.
*/
protected Symbol[] getConnectionCapabilitiesOffered() {
- return new Symbol[]{ ANONYMOUS_RELAY };
+ return new Symbol[]{ ANONYMOUS_RELAY, DELAYED_DELIVERY };
}
/**
http://git-wip-us.apache.org/repos/asf/activemq/blob/4a1f2f7c/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpConnectionsTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpConnectionsTest.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpConnectionsTest.java
index 2d154e6..414902f 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpConnectionsTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/interop/AmqpConnectionsTest.java
@@ -52,6 +52,7 @@ public class AmqpConnectionsTest extends AmqpClientTestSupport {
private static final Symbol QUEUE_PREFIX = Symbol.valueOf("queue-prefix");
private static final Symbol TOPIC_PREFIX = Symbol.valueOf("topic-prefix");
private static final Symbol ANONYMOUS_RELAY = Symbol.valueOf("ANONYMOUS-RELAY");
+ private static final Symbol DELAYED_DELIVERY = Symbol.valueOf("DELAYED_DELIVERY");
@Parameters(name="{0}")
public static Collection<Object[]> data() {
@@ -97,6 +98,10 @@ public class AmqpConnectionsTest extends AmqpClientTestSupport {
markAsInvalid("Broker did not indicate it support anonymous relay");
}
+ if (!contains(offered, DELAYED_DELIVERY)) {
+ markAsInvalid("Broker did not indicate it support delayed message delivery");
+ }
+
Map<Symbol, Object> properties = connection.getRemoteProperties();
if (!properties.containsKey(QUEUE_PREFIX)) {
markAsInvalid("Broker did not send a queue prefix value");