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 16:25:44 GMT
On Wed, Feb 13, 2008 at 5:42 PM, GeekPro <kish_897@yahoo.com> wrote:

>  FYI-- I am using hermes tool along with ActiveMQ for producing and consuming
>  messages.
>  YES I am using Topics but I didn't get the messages on both the listeners (I
>  got it only on one)

This is possible because the functionality of the failover://
composite transport is to connect to a single broker in the list at
random. And if the brokers are not configured to talk to one another
via the network connector configuration, then messages may not flow
the way you want.

>  Yes I am interested in failover -(Subscriber) and also (Producer)
>  Below is the code which I am using on the Client side for producing and
>  consuming messages
>
>  Note: I am using different IP address
>
>  Producer : failover://(tcp://10.0.0.1:61616,tcp://10.0.0.2:62626)
>  Subscriber: failover://(tcp://10.0.0.1:61616,tcp://10.0.0.2:62626)
>
>  Lets say when we produce the message it went to 62626.
>  But when we consume with the uri mentioned above I am not getting the
>  message.
>  Please tell me whether its a conf problem or my assumption is wrong.

I can't say for sure without knowing how the network connectors are
configured in each broker. They will need to point at one another for
broker-to-broker communication so that the store-and-forward
functionality works the way you want it to. The other thing that I
touched on before is that there is no point in having a broker point
to itself. So if you are only using two brokers, you only need to
point at the other broker via the network connector configuration
using the static:// composite transport.

I just tested this using two brokers, each pointing at the other via
the network connector configuration in each broker using the static://
composite transport. Then I ran the consumer using the following
command:

$ ant consumer -Dtopic=true
-Durl="failover://(tcp://localhost:61611,tcp://localhost:61612)"

And then I ran the producer using the following command:

$ ant producer -Dtopic=true
-Durl="failover://(tcp://localhost:61611,tcp://localhost:61612)"

The consumer connected to 61611 and waited for 10 messages. The
producer connected to 61612 and sent 10 messages and shut down. The
consumer that was connected to 61611 then received 10 messages and
shut down.

I think your configuration is not set correctly for the
broker-to-broker configuration.

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