activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: maxReconnectAttempts parameter
Date Thu, 22 Jan 2015 15:01:02 GMT
On 01/22/2015 09:35 AM, nelsoncc wrote:
> Hi,
>
> I'm trying to use the "maxReconnectAttempts" parameter, but without success.
>
> I'm using a client connection with the following URI:
> failover:(tcp://localhost:61616,tcp://localhost:61626)?randomize=false&useExponentialBackOff=false&initialReconnectDelay=1000&startupMaxReconnectAttempts=40&maxReconnectAttempts=1
>
> But when I shutdown the broker, and that Client tries to send a message it
> reports the error:
> "ActiveMQSessionKernel - Session Already Closed"
>
> After I start the broker again, it stills throw the same error.
> If I remove the maxReconnectAttempts, the client automatically reconnects
> and the message is successfully sent.
>
> What I need is that the client tries to reconnect, if it fails throw the
> error.
>
> Does anyone what configuration should I use?
>
> Kind Regards,
> Nelson Cintra.
>
>   
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/maxReconnectAttempts-parameter-tp4690272.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Seems as though it is working as intended, the max reconnects parameter 
means that once it tries that many times it will never try again and the 
connection will close.  If you register and ExceptionListener on the 
connection you should be informed of the error.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message