You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Daniel Laügt (JIRA)" <ji...@apache.org> on 2013/06/13 20:11:21 UTC
[jira] [Created] (AMQCPP-491) Connection didn't switch to the slave
broker when the master broker is down
Daniel Laügt created AMQCPP-491:
-----------------------------------
Summary: Connection didn't switch to the slave broker when the master broker is down
Key: AMQCPP-491
URL: https://issues.apache.org/jira/browse/AMQCPP-491
Project: ActiveMQ C++ Client
Issue Type: Bug
Components: Transports
Affects Versions: 3.7.0
Environment: Windows 7, VS2010
Reporter: Daniel Laügt
Assignee: Timothy Bish
Priority: Minor
Master/Slave configuration with a shared data directory:
ActiveMQ Configuration (activemq.xml):
<persistenceAdapter>
<kahaDB directory="\\host1\kahadb"/>
</persistenceAdapter>
URL:
failover:(tcp://host1:port1,tcp://host2:port2)?randomize=false
Test case:
1) Run ActiveMQ on host2, it becomes the master
2) Run ActiveMQ on host1, it becomes the slave
3) Run a program that opens an ActiveMQ connection
4) Shutdown ActiveMQ on host2
5) The ActiveMQ connection is not able to switch to host1.
Explanation:
The test case has randomize=false to be able to reproduce the problem anytime. If randomize=true, the problem occurs randomly.
At step 3, ActiveMQ-CPP tries to open first a connection with host1. It fails as host1 is the slave. Then it tries to open a connection with host2. This time, it succeeds but it forgets to put back the failure hosts (host1) to broker lists. At this point, the broker list = {host2}.
At step 5, ActiveMQ-CPP tries to open a connection with the broker list. As the broker list = {host2}, it will try to open a connection only with host2.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira