You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kal2 <ki...@gmail.com> on 2015/10/06 15:40:10 UTC

failover transport not timing out

I am using the following uri so the client fails over to other brokers in the
list quickly but i want the send call to fail if no brokers are available or
if the timeout occurs but during testing i do not see the timeout occuring
on the send.. the call to send simply waits for reconnect..

How can I get this to timeout so the client can get control back on timeout
failure? Why is "timeout=1000" not working as per document.

failover:()?randomize=false&priorityBackup=true&timeout=1000&nested.wireFormat.maxInactivityDuration=1000&backup=true&maxReconnectDelay=1000&updateURIsURL=/tmp/brokerlist.txt

brokerlist can have 1 or more uri, eg.
tcp://b1:61616,tcp://b2:61616





--
View this message in context: http://activemq.2283324.n4.nabble.com/failover-transport-not-timing-out-tp4702657.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: failover transport not timing out

Posted by Tim Bain <tb...@alumni.duke.edu>.
You may need to set maxReconnectAttempts and startupMaxReconnectAttempts to
get control back from the failover transport when no brokers are
available.  The failover transport's documentation (
http://activemq.apache.org/failover-transport-reference.html) explicitly
says that the timeout URI option affects send operations, which can only
happen once a connection has been established, and I expect that the code
is in fact working as documented given that description of the timeout URI
option.  Since what you want is to have control returned when no connection
can be established, you need to use the URI options that relate to
connection/reconnection attempts, rather than or in addition to the one
that relates to sends.

Tim
On Oct 6, 2015 11:54 AM, "kal2" <ki...@gmail.com> wrote:

> I am using the following uri so the client fails over to other brokers in
> the
> list quickly but i want the send call to fail if no brokers are available
> or
> if the timeout occurs but during testing i do not see the timeout occuring
> on the send.. the call to send simply waits for reconnect..
>
> How can I get this to timeout so the client can get control back on timeout
> failure? Why is "timeout=1000" not working as per document.
>
>
> failover:()?randomize=false&priorityBackup=true&timeout=1000&nested.wireFormat.maxInactivityDuration=1000&backup=true&maxReconnectDelay=1000&updateURIsURL=/tmp/brokerlist.txt
>
> brokerlist can have 1 or more uri, eg.
> tcp://b1:61616,tcp://b2:61616
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/failover-transport-not-timing-out-tp4702657.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>