activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Pavlovich <>
Subject Re: Cannot consume messages on queue after master/slave failover in ActiveMQ 5.8.0.
Date Wed, 16 Oct 2013 13:02:59 GMT

Try setting -Ddurable=true. It looks like you are producing non-persistent messages.  Non-persistent
messages would be lost when the master goes down.

Hope this helps.

On Oct 11, 2013, at 8:17 PM, dlaube <> wrote:

> I am encountering some issues with master/slave failover with ActiveMQ 5.8.0
> running on RHEL and would appreciate some recommendations/help from the
> community if possible. I have tried searching but nothing seems to resolve
> my issue. Using the ActiveMQ example apps (per
> I setup the consumer and producer
> using the failover transport and then walked through a failure on master.
> Steps to reproduce, along with the commands are included below.
> The consumer starts eating the messages that the producer sends to my
> TEST.FOO queue. Next, when I kill the ActiveMQ master broker, I see that the
> the producer reconnects to the slave/new-master and will continue sending
> messages where it left off. However, the consumer re-connects but then fails
> to receive any messages from the slave/new-master after failover. I see that
> the TEST.FOO queue was (re)created on the slave/new-master after the
> failover takes place. The consumer reports the following;  [java] 00:00:35
> WARN  Transport (tcp://master_IP:61616) failed, reason: 
> Connection reset, attempting to automatically
> reconnect    [java] 00:00:39 INFO  Successfully reconnected to
> tcp://slave:61616
> Steps to reproduce:
> 1. Start ActiveMQ broker master  and slave
> 2. Start ActiveMQ producer and consumer ( parenthesis and ampersands are
> escaped for good measure, otherwise BASH complains as expected )
> ant producer
> -Durl=failover://\(tcp://master:61616,tcp://slave:61616\)?randomize=false\&timeout=3000
> -Dtopic=false -DtimeToLive=30000 -Ddurable=false -Dmax=80000
> ant consumer
> -Durl=failover://\(tcp://master:61616,tcp://slave:61616\)?randomize=false\&timeout=3000
> -Dtopic=false -Ddurable=false -Dmax=80000
> 3. Kill ActiveMQ master and observe ActiveMQ slave takeover. Look for string
> "Becoming the master on dataSource:
> org.apache.commons.dbcp.BasicDataSource@2482c23d" in ActiveMQ logs located
> on the slave.
> 4. Observe timeout/reconnect operations in both the consumer and producer
> that was started in step #2. The producer will reconnect 
> Has anyone encountered this issue before with a two-node master/slave
> implementation of ActiveMQ? If so, what was the resolution?
> Best regards,
> -David Laube
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

View raw message