Re: Clients can get stuck in a reconnect loop with master-slave brokers

2011-03-29 Thread Gary Tully
added some sample code to https://cwiki.apache.org/confluence/display/ACTIVEMQ/How+do+I+embed+a+Broker+inside+a+Connection On 29 March 2011 15:08, rasmusback wrote: > Hi, > > Thanks, that does indeed fix the problem. I misunderstood your first > reply, since I assumed that >    BrokerService.addC

Re: Clients can get stuck in a reconnect loop with master-slave brokers

2011-03-29 Thread rasmusback
Hi, Thanks, that does indeed fix the problem. I misunderstood your first reply, since I assumed that BrokerService.addConnector(TransportConnector connector); would work similarly to BrokerService.addConnector(String bindAddress); >From the source code I can see that addConnector(String b

Re: Clients can get stuck in a reconnect loop with master-slave brokers

2011-03-28 Thread Gary Tully
using: BrokerService broker = new BrokerService(); TransportConnector connector = new TransportConnector(); connector.setUri(new URI("tcp://localhost:" + port)); broker.addConnector(connector); and your test works as e

Re: Clients can get stuck in a reconnect loop with master-slave brokers

2011-03-23 Thread rasmusback
Hi Gary, On Tue, Mar 22, 2011 at 5:16 PM, Gary Tully [via ActiveMQ] wrote: > The test needs some mods to ensure that the slave broker listen port > is only started when the broker becomes the baster. > > In code, the addition of the transportConnector needs to be: > >         // lazy create trans

Re: Clients can get stuck in a reconnect loop with master-slave brokers

2011-03-22 Thread Gary Tully
The test needs some mods to ensure that the slave broker listen port is only started when the broker becomes the baster. In code, the addition of the transportConnector needs to be: // lazy create transport connector on start completion TransportConnector connector = new Transport