[ 
https://issues.apache.org/activemq/browse/AMQ-319?page=comments#action_36515 ] 

james strachan commented on AMQ-319:
------------------------------------

Eric - in 4.x you can configure the amount of time or number of tempts that the 
failover: transport will attempt before the connection is considered dead and 
the operation (such as opening a connection) will consider to be failed.

Otherwise to avoid sends blocking you can use async sends...

http://incubator.apache.org/activemq/async-sends.html

however the only way to allow things like connection, session, producer, 
consumer to be created without blocking is to use a special transport filter 
that spoofs return responses for these operations - which effectively breaks 
JMS complaince (as we can't implement security for example).

>  ActiveMQ hangs when initial connection to broker fails using reliable 
> transport
> --------------------------------------------------------------------------------
>
>          Key: AMQ-319
>          URL: https://issues.apache.org/activemq/browse/AMQ-319
>      Project: ActiveMQ
>         Type: Improvement

>   Components: JMS client
>     Versions: 3.0
>     Reporter: Ramzi Saba
>      Fix For: 3.2.5

>
>
> Make these changes in the JMS client to avoid blocking on startup in case all 
> brokers are down:
> 1- Start the reliable tcp channel in its own thread (seems there was an 
> attempt to do so anyway)
> 2- Synchronous and asynchronous client calls (via session, consumer, etc.) to 
> the reliable tcp channel should simply verify if a reliable channel has been 
> already established, else throw a JMSException, alternatively allow the 
> client to configure a timeout (currently it's hardcoded for synchronous calls 
> only I believe).
> 3- Other than starting the reliable channel, the client should not be 
> responsible of reestablishing a lost or unavailable channel. I would delegate 
> reliability to the reliable channel itself.
> 4- Look into adding a listener to allow for a silent client startup and 
> reconnect behind the scene once the broker is up

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to