[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: ActiveMQ NMS, connection will be hung with an invalid URL
From:       Jim Gomes <e.semog () gmail ! com>
Date:       2013-07-31 22:43:10
Message-ID: CAGeZ+bjph6v=h04LsU8xw4qiQHZvup5vjK0Ym9inmsZYdDXHww () mail ! gmail ! com
[Download RAW message or body]


Use the following URL option to avoid hanging on startup when using the
failover transport.

activemq:failover:tcp://activemqhost:61616*
?transport.StartupMaxReconnectAttempts=3*

Set the startup max reconnect attempts to whatever number you want.  It
will eventually stop trying at start up.  Once it successfully connects at
least once, then it will use normal failover semantics to continually retry
connecting in case of a disconnect.



On Wed, Jul 31, 2013 at 11:06 AM, Timothy Bish <tabish121@gmail.com> wrote:

> On 07/30/2013 11:59 PM, yq8925 wrote:
> 
> > In NMS.ActiveMQ1.5.6 and 1.6.0, if target JMS server URL is invalid or no
> > responsible, the client program will be hung at code "ISession session =
> > connection.CreateSession(**AcknowledgementMode.**AutoAcknowledge)".
> > 
> > The "connection.RequestTimeout" does not work here...
> > 
> > Anyone could help on it?
> > 
> > 
> > 
> > --
> > View this message in context: http://activemq.2283324.n4.**
> > nabble.com/ActiveMQ-NMS-**connection-will-be-hung-with-**
> > an-invalid-URL-tp4669903.html<http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-connection-will-be-hung-with-an-invalid-URL-tp4669903.html>
> >  Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > 
> > Sounds like you are using the failover transport.  I'd guess you need to
> set the timeout option on the failover transport in order to have the send
> attempt bail if it can't connect after some time.
> 
> --
> Tim Bish
> Sr Software Engineer | RedHat Inc.
> tim.bish@redhat.com | www.fusesource.com | www.redhat.com
> skype: tabish121 | twitter: @tabish121
> blog: http://timbish.blogspot.com/
> 
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic