activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhanu (Commented) (JIRA)" <>
Subject [jira] [Commented] (AMQ-3809) Simple ActiveMQ consumer dies on failover
Date Wed, 18 Apr 2012 07:44:33 GMT


Bhanu commented on AMQ-3809:

Yeah, It seems quiet weird to explicitly maintain a non-daemon thread. From what I understood
is in my app the only non-daemon thread was the ActiveMQ Transport thread. When the broker
dies, the client Transport thread dies with an EOFException and the failover protocol tries
to start a new Transport(non-daemon) thread to initiate connection with the failover broker.
In this small window since no thread was non-daemon, the client application exits.

One shot at AMQ-796 can be something like maintaining a non-daemon failover thread apart from
the regular ActiveMQ Transport thread. This failover thread should perform the reconnection
and subsequent failover ActivMQ Transport thread spawning.

Thanks a lot guys !!
> Simple ActiveMQ consumer dies on failover
> -----------------------------------------
>                 Key: AMQ-3809
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Transport
>    Affects Versions: 5.5.1
>         Environment: solaris, linux
>            Reporter: Bhanu
> I have a simple consumer application which connects to the broker using failover url.
The consumer uses Message listener to asynchronously listen to messages. Whenever i kill my
primary broker, I get an EOF exception(which is expected), the consumer tries to connect to
failover broker but before it could finish the reconnect, it shuts down. 
> My simple producer connecting with the same failover url never dies and successfully
connects to failover broker.
> What is going on here?
> Posting the snippet with which the consumer dies:-
> 2012-04-17 06:45:25,771 WARN  org.apache.activemq.transport.failover.FailoverTransport
- Transport (host1/ failed to tcp://host1:61616 , attempting to automatically
reconnect due to:
> 2012-04-17 06:45:25,772 DEBUG org.apache.activemq.transport.failover.FailoverTransport
- Transport failed with the following exception:
>         at
>         at org.apache.activemq.openwire.OpenWireFormat.unmarshal(
>         at org.apache.activemq.transport.tcp.TcpTransport.readCommand(
>         at org.apache.activemq.transport.tcp.TcpTransport.doRun(
>         at
>         at
> 2012-04-17 06:45:25,774 DEBUG org.apache.activemq.transport.failover.FailoverTransport
- urlList connectionList:[tcp://host2:61616, tcp://host1:61616], from: [tcp://host1:61616,
> 2012-04-17 06:45:25,774 DEBUG org.apache.activemq.transport.failover.FailoverTransport
- Attempting connect to: tcp://host2:61616
> [20120417 06:45:25.776 EDT (Shutdown-ActiveMQConsumer) ActiveMQConsumer#stop INFO] Stopping
the consumer...
> 2012-04-17 06:45:26,242 DEBUG org.apache.activemq.transport.failover.FailoverTransport
- Stopped.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message