activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <>
Subject Re: If my ActiveMQ brokers are down, how do I tell my producer to stop blocking the thread?
Date Thu, 09 Jul 2015 04:25:44 GMT
The failover transport will retry forever by default, so a failure to
connect will never result in control being returned to your code.  If you
want that, you can set the maxReconnectAttempts URI option to return
control after a certain number of successive failures.  See for details.

I don't know what exactly the timeout URI option does (the description on
the wiki doesn't make that clear to me), but it doesn't sound to me like
what you're looking for.

On Jul 8, 2015 5:13 PM, "mport9491" <> wrote:

> My producer resides in a web application. The failover switch works as
> intended, however, when both of my ActiveMQ brokers are down, it doesn't
> seem to "timeout" and just throw an exception. What I want to achieve is a
> non-blocking producer.
> My broker URL is basically:
> failover:(tcp://,tcp://localhost:61616)?timeout=1000.
> I'm expecting it to timeout after one second when both brokers are down but
> unfortunately it does not timeout and it just blocks.
> Am I understanding the concept of timeout right?
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message