activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: Regarding Store and Forward: Network of Brokers
Date Thu, 14 Feb 2008 00:11:11 GMT
On Feb 13, 2008 4:17 PM, GeekPro <kish_897@yahoo.com> wrote:

> I mean the transportConnector Address..NeverMind I am clear in this but
> comming to our networkConnector
>
> In broker1 the network Connector  will have the
>
> uri = "static:(tcp://10.0.0.2:62626)"
>
> In broker2 the network Connector  will have th
>
> uri = "static:(tcp://10.0.0.2:61616)"
>
>
> Step 1:
> So from the Subscriber I had 2 instances one is listening to 61616 and the
> other with 62626(with out failover protocol)

OK, you have a subscriber pointing to each broker.

> Here in step1 if the 61616 gets the message then listener with 62626 is not
> getting the messagep

If you're expecting each subscriber to get a copy of the messages
you're sending, you'll need to use topics.

> Step2 :
>
> I have one more instance  which is listening to both 61616 and 62626 (with
> failover protocol)
>
> Here if the message goes to 62626 then the listener can't get the message in
> the failover I mentioned 61616 address as the first arg.

Well if you're using failover, then a random connection will be made
one of the brokers. I doubt this is the behavior that you want.

The easiest way to test any topology with ActiveMQ is using the
consumer/producer examples that come with ActiveMQ. I just did this,
in fact. I configured three brokers, brokerA points to brokerB,
brokerB points to brokerA and brokerC, brokerC points to brokerB. So I
have a linear topology that looks like this:

brokerB(61611) <--> brokerB(61612) <--> brokerC(61613)

In one terminal, I cd into the the ActiveMQ example directory and I
run 'ant consumer -Durl=tcp://localhost:61611'. Then in another
terminal, I cd into the ActiveMQ example directory and I run 'ant
producer -Durl=tcp://localhost:61613'. The messages are produced to
brokerC and the consumer on brokerA consumes them. This is a very
basic example but the example consumer and producer that come with
ActiveMQ have many, many options allowing you to test any topology
quite easily.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Mime
View raw message