| commit | d1bd92b4f13c7f146ed93534e5685b58632fbaf8 | [log] [tgz] |
|---|---|---|
| author | Robert Godfrey <rgodfrey@apache.org> | Tue Aug 26 15:18:40 2014 +0000 |
| committer | Robert Godfrey <rgodfrey@apache.org> | Tue Aug 26 15:18:40 2014 +0000 |
| tree | 43414e47ed10fb4e22fdf1d7ca4d66eaa0645668 | |
| parent | eb188ecb147e72b9bbc47f49d1d80fb8ac70f818 [diff] |
QPID-6046 : [Java Broker] [AMQP 1.0] when creating an outgoing link from the address amq.fanout (or any fanout exchange) bind the temporary queue to the exchange witht the queue name git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1620629 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java index def7552..660575e 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java
@@ -323,6 +323,19 @@ { exchange.addBinding(exchangeDestination.getInitialRoutingAddress(),queue,null); } + if(binding == null + && exchangeDestination.getInitialRoutingAddress() != null + && exchange.getType().equals(ExchangeDefaults.FANOUT_EXCHANGE_CLASS)) + { + exchange.addBinding(queue.getName(), queue, null); + } + else if(binding == null + && exchangeDestination.getInitialRoutingAddress() != null + && exchange.getType().equals(ExchangeDefaults.TOPIC_EXCHANGE_CLASS)) + { + exchange.addBinding("#", queue, null); + } + source.setDistributionMode(StdDistMode.COPY); qd = new QueueDestination(queue);