Instead of a jms bridge, use a network connector from the mobile broker to the backend broker. That is started in its own thread so it will not halt the start of a broker.
I think you should raise a jira issue for the jms bridge, it should operate in the same way w.r.t not blocking a broker start. There are loads of java code examples in the tests, for example, see: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java?view=log On 23 November 2010 08:42, CajunDust <p...@xepos.be> wrote: > > Hello, > > For starters, I have read the documentation (API, FAQ,..) of the site, and I > have even read the book ActiveLMQ in Action (MEAP). It could be that I > misread or did not stumble on information that I need for my problem. > > Usecase: > I am trying to set up a "network of brokers", that is to say, one "mobile" > JMS server, located on a limited resources device, and one JMS server at a > office backend. > The mobile JMS server has to deal with the possibility that network can go > down, or might not be available when it starts. > The mobile JMS server has to forward some of the destinations to the backend > JMS, without ever loosing one message during interruption of network. > Oh, yeah, did I mention limited resources ? I cannot use any spring bean > configuration either !!! So all has to be done in plain Java code. (There > is NO explicit documentation (anymore?) about this on site or in the book ). > > The connection URL are as follows : > mobile JMS: tcp://10.0.0.2:61112 > backend JMS: tcp://10.0.0.1:61111 > bridge URL: static://(tcp://10.0.0.1:61111) > > The problem is that when the "mobile" server is started before the "backend" > jms server, or when there is no connection, the server halts at the > broker.start() method. If no bridges are configured, or can be reached, > there is no problem. forwarding works like a charm. > > Secondly, there is no timeout, even when the suggested parameters are added > to the bridge URL. > > It is very annoying that the "mobile" jms server does not continue to start, > and even does not accept any messages, neither continues after timeout... it > just stalls ! > > Can anyone give me some hints, solutions or pointers to solve this problem ? > Or should I abandon the bridge solution for "mobile" environments without > fixed network ? > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/JMS-Bridge-with-static-URL-blocks-at-startup-tp3054999p3054999.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- http://blog.garytully.com http://fusesource.com