You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by activemqer <ab...@gmail.com> on 2006/12/28 16:32:38 UTC

network of brokers

Hi,
I'm trying to cluster two brokers on two separate machines. I'd like to post
messages to broker A and the messages to flow to broker B so I have two
brokers with same set of messages. I'd like this to be able to failover from
one broker to the other in case of an outage.
The problem is I don't see the messages flow between the two brokers, they
stay in the broker A's persistant storage. I found in the documentation that
there is a way to enforce the message flow with the dynamicOnly set to false
but it did not make any difference. Am I missing anything?

I have the following network connectors configured:
* on host A:
<networkConnector name="A and B" uri="static://(tcp://B:61616)"
failover="true" dynamicOnly="false" networkTTL="10"/>

* on host B:
<networkConnector name="A and B" uri="static://(tcp://A:61616)"
failover="true" dynamicOnly="false" networkTTL="10"/>

One more detail, if it helps, when I'm posting messages to the queue, there
are no listeners on either broker.

Thanks.
-- 
View this message in context: http://www.nabble.com/network-of-brokers-tf2890777.html#a8076003
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: network of brokers

Posted by Marlon Santos <ms...@exist.com>.
Hi,

One more thing, this was in the docs that you referred to.

"At any point in time the message will only exist in one broker's store at
once until its consumed. In the future we will support high availability
brokers using a master-slave protocol where we willl replicate a message on
to a number of slave brokers for hot standby if the master broker were to be
unavailable for a certain period of time."

Which means that you have to use a master/slave topology because it is not
possible to have two brokers to have the same set of messages, which is what
you wanted...

Regards,
Marlon 
-- 
View this message in context: http://www.nabble.com/network-of-brokers-tf2890777.html#a8083177
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: network of brokers

Posted by Marlon Santos <ms...@exist.com>.
Hi,

AFAIK, it's still supported. If you want to see the message flow, create a
publisher/producer on brokerA and have a consumer/listener on brokerB which
consumes the messages on the queue on brokerA. 

The messages are only distributed to other brokers or clients when there is
a request for the message on the queue. So you were not seeing the message
flow on your case because maybe you dont have a consumer/client requesting
for the message. 

Regards,
Marlon



activemqer wrote:
> 
> I'm trying to achieve some kind of a load balancing in our project. I
> don't think that master/slave can solve that problem. It merely is a
> recovery mechanism, which is good but not good enough for me.
> 
> Just to clarify the reason I'm posting this message. I read on the the doc
> page that ActiveMQ supports distributed queues and the way to achieve that
> is to use a network of brokers. Is this still true? Because I don't see
> messages flow between brokers even when I subscribe to a queue on a broker
> that does not currently have any messages. May be I'm just misinterpreting
> the documentation.
> 
> http://www.activemq.org/site/how-do-distributed-queues-work.html
> 
> 
> John Heitmann wrote:
>> 
>>> It sounds like you may want to try out the master/slave feature  
>>> instead if you care about both 0 message loss during failure and that  
>>> a message must be consumed once and only once.
>> 
>> John
>> 
>> On Dec 28, 2006, at 7:32 AM, activemqer wrote:
>> 
>>>
>>> Hi,
>>> I'm trying to cluster two brokers on two separate machines. I'd  
>>> like to post
>>> messages to broker A and the messages to flow to broker B so I have  
>>> two
>>> brokers with same set of messages. I'd like this to be able to  
>>> failover from
>>> one broker to the other in case of an outage.
>>> The problem is I don't see the messages flow between the two  
>>> brokers, they
>>> stay in the broker A's persistant storage. I found in the  
>>> documentation that
>>> there is a way to enforce the message flow with the dynamicOnly set  
>>> to false
>>> but it did not make any difference. Am I missing anything?
>>>
>>> I have the following network connectors configured:
>>> * on host A:
>>> <networkConnector name="A and B" uri="static://(tcp://B:61616)"
>>> failover="true" dynamicOnly="false" networkTTL="10"/>
>>>
>>> * on host B:
>>> <networkConnector name="A and B" uri="static://(tcp://A:61616)"
>>> failover="true" dynamicOnly="false" networkTTL="10"/>
>>>
>>> One more detail, if it helps, when I'm posting messages to the  
>>> queue, there
>>> are no listeners on either broker.
>>>
>>> Thanks.
>>> -- 
>>> View this message in context: http://www.nabble.com/network-of- 
>>> brokers-tf2890777.html#a8076003
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/network-of-brokers-tf2890777.html#a8083110
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: network of brokers

Posted by activemqer <ab...@gmail.com>.
I'm trying to achieve some kind of a load balancing in our project. I don't
think that master/slave can solve that problem. It merely is a recovery
mechanism, which is good but not good enough for me.

Just to clarify the reason I'm posting this message. I read on the the doc
page that ActiveMQ supports distributed queues and the way to achieve that
is to use a network of brokers. Is this still true? Because I don't see
messages flow between brokers even when I subscribe to a queue on a broker
that does not currently have any messages. May be I'm just misinterpreting
the documentation.

http://www.activemq.org/site/how-do-distributed-queues-work.html


John Heitmann wrote:
> 
>> It sounds like you may want to try out the master/slave feature  
>> instead if you care about both 0 message loss during failure and that  
>> a message must be consumed once and only once.
> 
> John
> 
> On Dec 28, 2006, at 7:32 AM, activemqer wrote:
> 
>>
>> Hi,
>> I'm trying to cluster two brokers on two separate machines. I'd  
>> like to post
>> messages to broker A and the messages to flow to broker B so I have  
>> two
>> brokers with same set of messages. I'd like this to be able to  
>> failover from
>> one broker to the other in case of an outage.
>> The problem is I don't see the messages flow between the two  
>> brokers, they
>> stay in the broker A's persistant storage. I found in the  
>> documentation that
>> there is a way to enforce the message flow with the dynamicOnly set  
>> to false
>> but it did not make any difference. Am I missing anything?
>>
>> I have the following network connectors configured:
>> * on host A:
>> <networkConnector name="A and B" uri="static://(tcp://B:61616)"
>> failover="true" dynamicOnly="false" networkTTL="10"/>
>>
>> * on host B:
>> <networkConnector name="A and B" uri="static://(tcp://A:61616)"
>> failover="true" dynamicOnly="false" networkTTL="10"/>
>>
>> One more detail, if it helps, when I'm posting messages to the  
>> queue, there
>> are no listeners on either broker.
>>
>> Thanks.
>> -- 
>> View this message in context: http://www.nabble.com/network-of- 
>> brokers-tf2890777.html#a8076003
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/network-of-brokers-tf2890777.html#a8079110
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: network of brokers

Posted by John Heitmann <jh...@gmail.com>.
What you may want instead is the staticallyIncludedDestinations  
feature. You could also use startup destinations.

In either case it won't match what you want since you're using  
queues. If you really want both A's consumers and B's consumers to  
receive the same set of messages, then you'll need to use a topic,  
and perhaps something like virtual destinations to bridge to a queue  
at each broker. Otherwise queue semantics hold even across the network.

It sounds like you may want to try out the master/slave feature  
instead if you care about both 0 message loss during failure and that  
a message must be consumed once and only once.

John

On Dec 28, 2006, at 7:32 AM, activemqer wrote:

>
> Hi,
> I'm trying to cluster two brokers on two separate machines. I'd  
> like to post
> messages to broker A and the messages to flow to broker B so I have  
> two
> brokers with same set of messages. I'd like this to be able to  
> failover from
> one broker to the other in case of an outage.
> The problem is I don't see the messages flow between the two  
> brokers, they
> stay in the broker A's persistant storage. I found in the  
> documentation that
> there is a way to enforce the message flow with the dynamicOnly set  
> to false
> but it did not make any difference. Am I missing anything?
>
> I have the following network connectors configured:
> * on host A:
> <networkConnector name="A and B" uri="static://(tcp://B:61616)"
> failover="true" dynamicOnly="false" networkTTL="10"/>
>
> * on host B:
> <networkConnector name="A and B" uri="static://(tcp://A:61616)"
> failover="true" dynamicOnly="false" networkTTL="10"/>
>
> One more detail, if it helps, when I'm posting messages to the  
> queue, there
> are no listeners on either broker.
>
> Thanks.
> -- 
> View this message in context: http://www.nabble.com/network-of- 
> brokers-tf2890777.html#a8076003
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>