cshannon commented on a change in pull request #2892: ARTEMIS-2549 - Add
Downstream support to Federation
URL: https://github.com/apache/activemq-artemis/pull/2892#discussion_r348445547
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/address/FederatedAddress.java
##########
@@ -113,7 +116,31 @@ public void start() {
*/
@Override
public synchronized void afterCreateQueue(Queue queue) {
- createRemoteConsumer(queue);
+ conditionalCreateRemoteConsumer(queue);
+ }
+
+ private void conditionalCreateRemoteConsumer(Queue queue) {
+ //Always create demand if not a federated queue
+ if (!queue.getName().toString().startsWith(FEDERATED_QUEUE_PREFIX)) {
Review comment:
@michaelandrepearce - This change is primarily there for the use case of 2
brokers each configured with a downstream with each other. (so
bi-directional). If a consumer is created on broker0 then a federated consumer
should be created on broker 1 and there should just be 1 consumer on each
broker. However, without this change you end up with a federated consumer on
broker 0 as well (so 2 total consumers) eventhough there is no demand from a
local consumer on broker 1. I will push an update in a minute with a new test
to show this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services