You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by chris <em...@christianhoffmann.info> on 2010/07/07 17:44:10 UTC

network of brokers: consumer after broker reconnect not working

Hi,

I have a network of two brokers that have auto discovered themselves via
multicast. In Jconsole I can see that both brokers are well connected
(Network bridge is visible). I also have a consumer running that consumes
on a queue. That consumers has a failover URI with both brokers mentioned.
In JConsole, I can see that the queue is available in both brokers and that
on both brokers I have consumer count set to 1. I start a producer with
same failover URI that sends messages to that queue and it gets consumed
without problems. I then kill one broker, everything continues to work. I
bring the broker back, but now the consumer count on that broker remains 0
and if I restart the producer the messages pile up and don't get consumed.
It only works, if the producer is connected to the same broker as the
consumer (randomly the case).

If I restart the consumer, everything works again.

Is that expected behavior?

Regards,

Chris



Re: Broker clustering with Mutlicast not working

Posted by Gary Tully <ga...@gmail.com>.
Can u use the 0.0.0.0 wildcard or ip address in the transport
connector instead of localhost.
A network is store nd forward, not replication, so a message will only
be on one of the brokers.

On Friday, July 9, 2010,  <Ha...@gpj.com> wrote:
> I have two brokers, both embedded inside JBoss running on two different
> machines within the same network. I  have the following network and
> transport settings for the brokers:
>
> Broker1:
>        <networkConnectors>
>           <networkConnector uri="multicast://default"/>
>         </networkConnectors>
>
> <transportConnector uri="tcp://localhost:0"
> discoveryUri="multicast://default"/>
>
>
> Broker2:
>         <networkConnectors>
>           <networkConnector uri="multicast://default"/>
>         </networkConnectors>
>
> <transportConnector uri="tcp://localhost:0"
> discoveryUri="multicast://default"/>
>
>
> When i run the two brokers with these settings i see the network bridge
> error. But running two brokers with the same settings on my local machine
> runs fine.
>
> Related question is that if i have a producer and consumer with the
> following connection property:
>  <property name="brokerURL"
> value="discovery:(multicast://default)?initialReconnectDelay=100"/>
>
> provided the two brokers are connected, does it mean that when i send the
> message to the Queue running on one broker it would be copied to the other
> broker too? And does
> it mean that it would be consumed twice?
>
>
> Thanks!
> Hammad
>

-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Broker clustering with Mutlicast not working

Posted by Ha...@gpj.com.
I have two brokers, both embedded inside JBoss running on two different 
machines within the same network. I  have the following network and 
transport settings for the brokers:

Broker1:
       <networkConnectors>
          <networkConnector uri="multicast://default"/>
        </networkConnectors>

<transportConnector uri="tcp://localhost:0" 
discoveryUri="multicast://default"/>


Broker2:
        <networkConnectors>
          <networkConnector uri="multicast://default"/>
        </networkConnectors>

<transportConnector uri="tcp://localhost:0" 
discoveryUri="multicast://default"/>


When i run the two brokers with these settings i see the network bridge 
error. But running two brokers with the same settings on my local machine 
runs fine.

Related question is that if i have a producer and consumer with the 
following connection property:
 <property name="brokerURL" 
value="discovery:(multicast://default)?initialReconnectDelay=100"/> 

provided the two brokers are connected, does it mean that when i send the 
message to the Queue running on one broker it would be copied to the other 
broker too? And does
it mean that it would be consumed twice?


Thanks!
Hammad 

Re: network of brokers: consumer after broker reconnect not working

Posted by Christian Hoffmann <em...@christianhoffmann.info>.
Hi,

I can't reproduce this problem persistently today. Strange. Maybe some 
timing issue.

I'll post again, once I can produce a "reliable" test case.

Thanks for caring,

Chris

On 07/07/2010 07:31 PM, Joe Fernandez wrote:
>
> This seems to work fine for me with 5.3.2. What version of AMQ are you using?
>
> Care to share your AMQ cfg file?
>
> Joe
> http://www.ttmsolutions.com
> ActiveMQ reference guide at
> http://bit.ly/AMQRefGuide
>
>
> Christian Hoffmann-5 wrote:
>>
>> Hi,
>>
>> I have a network of two brokers that have auto discovered themselves via
>> multicast. In Jconsole I can see that both brokers are well connected
>> (Network bridge is visible). I also have a consumer running that consumes
>> on a queue. That consumers has a failover URI with both brokers mentioned.
>> In JConsole, I can see that the queue is available in both brokers and
>> that
>> on both brokers I have consumer count set to 1. I start a producer with
>> same failover URI that sends messages to that queue and it gets consumed
>> without problems. I then kill one broker, everything continues to work. I
>> bring the broker back, but now the consumer count on that broker remains 0
>> and if I restart the producer the messages pile up and don't get consumed.
>> It only works, if the producer is connected to the same broker as the
>> consumer (randomly the case).
>>
>> If I restart the consumer, everything works again.
>>
>> Is that expected behavior?
>>
>> Regards,
>>
>> Chris
>>
>>
>>
>>
>


Re: network of brokers: consumer after broker reconnect not working

Posted by Joe Fernandez <jo...@ttmsolutions.com>.
This seems to work fine for me with 5.3.2. What version of AMQ are you using?

Care to share your AMQ cfg file?

Joe
http://www.ttmsolutions.com
ActiveMQ reference guide at
http://bit.ly/AMQRefGuide
 

Christian Hoffmann-5 wrote:
> 
> Hi,
> 
> I have a network of two brokers that have auto discovered themselves via
> multicast. In Jconsole I can see that both brokers are well connected
> (Network bridge is visible). I also have a consumer running that consumes
> on a queue. That consumers has a failover URI with both brokers mentioned.
> In JConsole, I can see that the queue is available in both brokers and
> that
> on both brokers I have consumer count set to 1. I start a producer with
> same failover URI that sends messages to that queue and it gets consumed
> without problems. I then kill one broker, everything continues to work. I
> bring the broker back, but now the consumer count on that broker remains 0
> and if I restart the producer the messages pile up and don't get consumed.
> It only works, if the producer is connected to the same broker as the
> consumer (randomly the case).
> 
> If I restart the consumer, everything works again.
> 
> Is that expected behavior?
> 
> Regards,
> 
> Chris
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/network-of-brokers%3A-consumer-after-broker-reconnect-not-working-tp29097909p29099027.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.