Re: If my ActiveMQ brokers are down, how do I tell my producer to stop blocking the thread?

2015-07-14 Thread artnaseef
Great!  Thank you for letting me know.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/If-my-ActiveMQ-brokers-are-down-how-do-I-tell-my-producer-to-stop-blocking-the-thread-tp4698835p4699303.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: If my ActiveMQ brokers are down, how do I tell my producer to stop blocking the thread?

2015-07-10 Thread mport9491
This was really helpful. Thank you!



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/If-my-ActiveMQ-brokers-are-down-how-do-I-tell-my-producer-to-stop-blocking-the-thread-tp4698835p4699041.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: If my ActiveMQ brokers are down, how do I tell my producer to stop blocking the thread?

2015-07-09 Thread artnaseef
The timeout setting only works when the pending outbound request over the
transport is a message send, and only when the transport is disconnected and
stays disconnected.

If any request other than a message send is pending (e.g. consumer or
producer creation), the timeout is not applied.  Also, if the send is
blocked on the broker side for any reason (such as producer flow control),
then the timeout does not apply.




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/If-my-ActiveMQ-brokers-are-down-how-do-I-tell-my-producer-to-stop-blocking-the-thread-tp4698835p4698949.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: If my ActiveMQ brokers are down, how do I tell my producer to stop blocking the thread?

2015-07-08 Thread Tim Bain
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
http://activemq.apache.org/failover-transport-reference.html 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.

Tim
On Jul 8, 2015 5:13 PM, mport9491 mport9...@gmail.com 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://10.0.112.49:61616,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:
 http://activemq.2283324.n4.nabble.com/If-my-ActiveMQ-brokers-are-down-how-do-I-tell-my-producer-to-stop-blocking-the-thread-tp4698835.html
 Sent from the ActiveMQ - User mailing list archive at Nabble.com.



If my ActiveMQ brokers are down, how do I tell my producer to stop blocking the thread?

2015-07-08 Thread mport9491
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://10.0.112.49:61616,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: 
http://activemq.2283324.n4.nabble.com/If-my-ActiveMQ-brokers-are-down-how-do-I-tell-my-producer-to-stop-blocking-the-thread-tp4698835.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.