I guess i'll try using two different URIs
producers One with maxReconnectAttempts=2 - this will not block my producer
consumers one with default value of maxRecconecetAttempts - which is -1

cuz i want my consumers to keep trying reconnect forever - since they don't
block anyone.

Thank you for your help.

Diego Rodríguez wrote:
> 
> Hi,
> 
>     I have a similar config. I think the problem is because you have
> maxReconnectAttempts parameter set to 2. When the connection reaches max
> attempts it does not try to connect again, which is logicall. If you want
> to revive your consumers you will have to reinstall them. At least is what
> I have to do for consumers using ActiveMQConnectionFactory. Por producers
> using PooledConnectionFactory, they get a new connection from pool. I
> don't know if ActiveMQConnectionFactory is intended to work that way
> 
>     The problem is that if you don't set maxReconnectAttempts, if the
> broker shutdowns, trying to reconnect is blocking, and for example in my
> case this can lead to exhaust tomcat thread pool because threads waits for
> connection to be avalaible. I would rather prefer setting a timeout trying
> to connect so the calls are not blocking, and try to reconnect forever but
> this won't be available until 5.3 release, I think
> 
>     Diego
> 

-- 
View this message in context: 
http://www.nabble.com/Reconnect-of-the-durable-consumers-after-ActiveMQ-restart-fail-tp23274688p23295556.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to