activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sub3 <st...@subwest.com>
Subject Shutting down a broker w/an active queue
Date Thu, 14 Jul 2011 20:42:37 GMT
Hi,
I am experimenting with multiple consumers & shutting them down
individually.

I have a scenario where I have a consumer and someone sends something to
'testQueue'.

> broker = new BrokerService();
> broker.setBrokerName("PhillyBroker");
> broker.addConnector("tcp://localhost:61616");
> broker.start();

Currently, no one is listening to that queue because a component is down...
but eventually, it will be back and will want that message.  In the
meantime, I start up a second broker & I create a network connector for it.

> NetworkConnector connector =
> broker.addNetworkConnector("static://"+"tcp://denver:61616");
> connector.setDuplex(true);
> connector.start();

Eventually, I'll want to shut down the first broker for maintenance.  But,
the 'testQueue' is still there because it is waiting for a consumer, & it
won't move to the second broker because no one on that broker is consuming
it.

I shut down the broker using:
> broker.stopGracefully("", "", 60*1000, 5*1000);

So, my question: Is there anything I can do before stopping the original
broker which will push this queue/messages to the second broker?

Thanks in advance.


--
View this message in context: http://activemq.2283324.n4.nabble.com/Shutting-down-a-broker-w-an-active-queue-tp3668611p3668611.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message