You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ragha <rk...@yahoo.com> on 2010/01/25 19:49:02 UTC

Network of Brokers using Durable Topics

Hi,
My question relates to network of brokers. I have the a setup with 3 brokers
- A, B and C and have configured
unidirectional bridges between each pairs i.e A-B,B-A,A->C,C->A,B->C,C->B (I
might configure duplex connections, but hopefully it matter for now).

I have multiple subscribers/publishers each with unique client ids that
publish and subscribe to message on the same Topic. 
They can connect to any of the brokers randomly. The question that I have is
- Is the state of each client (subscriber) 
published between the brokers? 

For instance, if susbcriber_1 was connected to broker B, goes offline for a
while and then reconnects to broker A, would broker A know
where subscriber_1 left off and then send all the messages that subscriber_1
missed? 
(In my current setup, the subscriber seems to loose the messages while it
was offline)

Another question along the similar lines, if a certain broker on the network
goes offline and then joins back in, then is the 
state with respect to each of the subscribers fed back by the available
brokers in the network?

Below is snippet of how I've configured each of the three brokers in order-

        <networkConnectors>
            <networkConnector name="nbroker-2 and nbroker-3" duplex="true"
networkTTL="3"
uri="static://(tcp://localhost:61617,tcp://localhost:61618)"/>
        </networkConnectors>

        <networkConnectors>
            <networkConnector name="nbroker-1 and nbroker-3" duplex="true"
networkTTL="3"
uri="static://(tcp://localhost:61616,tcp://localhost:61618)"/>
        </networkConnectors>

        <networkConnectors>
            <networkConnector name="nbroker-1 and nbroker-2" duplex="true"
networkTTL="3"
uri="static://(tcp://localhost:61616,tcp://localhost:61617)"/>
        </networkConnectors>



-- 
View this message in context: http://old.nabble.com/Network-of-Brokers-using-Durable-Topics-tp27311079p27311079.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers using Durable Topics

Posted by Ragha <rk...@yahoo.com>.
Thanks. I' was under the same opinion, but the question really boils down to
if information about the state (i.e what was the last message consumed) a
certain subscriber is relayed across to other brokers in the network.

Say, if a subscriber with ClientID_A connects to broker A, and then at a
later point connects to broker B..will broker B treat this as a new
subscriber (consumer) and resend all messages or would it have information
about this client from broker A?

I've been able to find a reference to a similar problem in this post here -
http://old.nabble.com/Receiving-old-messages-on-durable-topics-after-application-restart-using-ActiveMQ-two-node-cluster-td26230816.html

At the very end, there is a suggestion to use virtual topics. Just
interested in knowing if would that work?



honeybun wrote:
> 
> I've tested a similar configuration with two bi-directional
> networkConnectors.  I think the short answer is a network of brokers
> behaves just like a single broker without you having to worry about it.
> 

-- 
View this message in context: http://old.nabble.com/Network-of-Brokers-using-Durable-Topics-tp27311079p27358901.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers using Durable Topics

Posted by honeybun <js...@biobex.com>.
I've tested a similar configuration with two bi-directional
networkConnectors.  I think the short answer is a network of brokers behaves
just like a single broker without you having to worry about it.
-- 
View this message in context: http://old.nabble.com/Network-of-Brokers-using-Durable-Topics-tp27311079p27312369.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.