summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-11-14 16:04:28 +0000
committerAlan Conway <aconway@apache.org>2012-11-14 16:04:28 +0000
commite89ee3715fe9b7b52177426332904acd05647034 (patch)
tree4149f7e4d851af3f1e80d2da7f7b25b6217f7276 /qpid/cpp/src
parent8dd9f6c659d3a4cf31ef336dcccff819b8223d1b (diff)
downloadqpid-python-e89ee3715fe9b7b52177426332904acd05647034.tar.gz
QPID-4401: Revert: HA bindings for QMF exchanges not replicated.
This reverts r1403946: There was a problem with this, for example if I bind a queue Q to receive broker events. On the backup, Q will receive double events: from the replicating subscription to the primary and events generated locally in the backup broker. That can cause the backup to generate "invalid position" errors and shut down. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1409243 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/Broker.cpp4
-rwxr-xr-xqpid/cpp/src/tests/ha_tests.py25
2 files changed, 2 insertions, 27 deletions
diff --git a/qpid/cpp/src/qpid/broker/Broker.cpp b/qpid/cpp/src/qpid/broker/Broker.cpp
index 96de6998b0..96f88da8ea 100644
--- a/qpid/cpp/src/qpid/broker/Broker.cpp
+++ b/qpid/cpp/src/qpid/broker/Broker.cpp
@@ -319,9 +319,9 @@ Broker::Broker(const Broker::Options& conf) :
std::string qmfDirect("qmf.default.direct");
std::pair<Exchange::shared_ptr, bool> topicPair(
- exchanges.declare(qmfTopic, ManagementTopicExchange::typeName, false));
+ exchanges.declare(qmfTopic, ManagementTopicExchange::typeName, false, noReplicateArgs()));
std::pair<Exchange::shared_ptr, bool> directPair(
- exchanges.declare(qmfDirect, ManagementDirectExchange::typeName, false));
+ exchanges.declare(qmfDirect, ManagementDirectExchange::typeName, false, noReplicateArgs()));
boost::dynamic_pointer_cast<ManagementDirectExchange>(directPair.first)->setManagmentAgent(managementAgent.get(), 2);
boost::dynamic_pointer_cast<ManagementTopicExchange>(topicPair.first)->setManagmentAgent(managementAgent.get(), 2);
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py
index e1822cd250..bc5566ae63 100755
--- a/qpid/cpp/src/tests/ha_tests.py
+++ b/qpid/cpp/src/tests/ha_tests.py
@@ -807,31 +807,6 @@ acl deny all all
# The backup does not log this as an error so we only check the backup log for errors.
self.assert_log_no_errors(cluster[1])
- def test_qmf_replication(self):
- """QPID-4401: Verify that QMF built-in exchanges have default replication"""
- cluster = HaCluster(self, 2)
- cluster[0].wait_status("active")
- sn = cluster.connect(0).session()
- events = sn.receiver("events;{create:always,node:{x-bindings:[{exchange:'qmf.default.topic',queue:'events',key:'agent.ind.event.org_apache_qpid_broker.#'}]}}")
- def verify_qmf_events(qname):
- sn.sender("%s;{create:always}"%(qname)).close() # Generate a QMF event
- found = False
- try:
- while not found:
- m = events.fetch(timeout=1) # Receive
- def class_name(m): return m.content[0]['_schema_id']['_class_name']
- def q_name(m): return m.content[0]['_values']['qName']
- if class_name(m) == 'queueDeclare' and q_name(m) == qname: found = True
- except Empty: pass
- assert(found)
- try:
- l = LogLevel(ERROR) # Hide expected WARNING log messages from failover.
- verify_qmf_events("q1")
- cluster[1].wait_status("ready")
- cluster.kill(0)
- verify_qmf_events("q2")
- finally: l.restore()
-
def test_missed_recreate(self):
"""If a queue or exchange is destroyed and one with the same name re-created
while a backup is disconnected, the backup should also delete/recreate