activemq-users mailing list archives

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

I have a scenario where I have a consumer and someone sends something to

> 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

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:
Sent from the ActiveMQ - User mailing list archive at

View raw message