On Mon, Jul 11, 2011 at 2:40 PM, Sander Mak <sander...@gmail.com> wrote: > On Mon, Jul 11, 2011 at 2:28 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: >> How do you shutdown the AMQ broker? > > I ctrl-c in the broker console. > >> And why do you want to shutdown the broker, but keep on running Camel? > > Just to make it clear: the Camel app is running standalone here, not > inside the broker.
Ah yeah that should work fine with 2 different JVMs. See this tutorial http://camel.apache.org/tutorial-jmsremoting.html There is a JMS broker and a JMS client running in 2 different JVMs. The AMQ has a failover protocol that automatic will be able to re-connect to the AMQ broker when it runs again. Make sure you use that (it is default though). > > The camel route is triggered by incoming messages on a queue. If the > queue cannot be read, I want my app to keep trying until it can read > from the queue again (meanwhile logging the errors it encounters > ofcourse). Doesn't seem like an uncommon requirement to me. Also, this > is the standard behavior of the DefaultMessageListenerContainer that > powers the JmsListener. However, the spurious shutdown of the JVM in > this scenario prevents this mechanism from kicking in (more precisely: > I see *some* reconnect attempts, but the shutdown procedure kicks in > anyway). > > The whole point of using JMS to me is the decoupling of > producer/consumer. However as it stands, my app cannot survive a > broker unavailability event? > > Thanks, > Sander > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/