Hi there,

I have trouble to understand how does the conduit subscriptions option work
in a network of brokers.
Below is a sample code that does the following:

* Create 3 brokers and network them: broker1 <> broker2 <> broker3
** conduitSubscriptions option is set on every netwotk connector
** The ttl is set so that messages and subscriptions can go through all the
brokers
* Create 3 camel contexts with some routes that allow to:
** Post a message to the topic1 from any client connected to any broker
** Subscribes to topic1 from any client connected to any broker

The unit test creates a Canel ProducerTemplate that posts a messages to
topic1 from the broker1.
As ActiveMQ and Camel are configured, and as far as I understand the
conduitSubscriptions option, I would expect the message to be delivered to
the mock endpoints only once on each.

The result is quite confusing:
* mockEndpoint1 receives 1 message
* mockEndpoint2 receives twice the same message
* mockEndpoint3 receives twice the same message

In the ActiveMQ and Camel debug logs I can clearly see that the message is
sent twice in the topic1 from broker1 to broker2 and same from broker 3 to
broker2.

It's expected that the topic1 subscriptions on broker2 and broker3 are
propoagated to broker1, but I though it would be considered as a unique
subscription from the broker1 perspective. This is not what seems to happen.

It's annoying because it introduces duplicate messages then. I thought the
conduitSubscriptions option was actually meant to fix this.

I must be missing something here but can't see what.

Any insight?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Conduit-subscriptions-when-using-Network-of-brokers-and-Camel-topic-subscriptions-tp4715559.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to