diff options
| author | Alan Conway <aconway@apache.org> | 2012-11-14 16:04:28 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-11-14 16:04:28 +0000 |
| commit | 679b0073bd260f2d3535f0884814ee3f7231f799 (patch) | |
| tree | 842cb1b34889612a60bf0b684a0fbf732d1197dc | |
| parent | 8caf21322ffda90a9b2b040b0dad09b5bc21c14d (diff) | |
| download | qpid-python-679b0073bd260f2d3535f0884814ee3f7231f799.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/qpid@1409243 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | cpp/src/qpid/broker/Broker.cpp | 4 | ||||
| -rwxr-xr-x | cpp/src/tests/ha_tests.py | 25 | ||||
| -rw-r--r-- | doc/book/src/cpp-broker/Active-Passive-Cluster.xml | 11 |
3 files changed, 10 insertions, 30 deletions
diff --git a/cpp/src/qpid/broker/Broker.cpp b/cpp/src/qpid/broker/Broker.cpp index 96de6998b0..96f88da8ea 100644 --- a/cpp/src/qpid/broker/Broker.cpp +++ b/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/cpp/src/tests/ha_tests.py b/cpp/src/tests/ha_tests.py index e1822cd250..bc5566ae63 100755 --- a/cpp/src/tests/ha_tests.py +++ b/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 diff --git a/doc/book/src/cpp-broker/Active-Passive-Cluster.xml b/doc/book/src/cpp-broker/Active-Passive-Cluster.xml index 4c1d742841..65ce108aef 100644 --- a/doc/book/src/cpp-broker/Active-Passive-Cluster.xml +++ b/doc/book/src/cpp-broker/Active-Passive-Cluster.xml @@ -594,9 +594,14 @@ NOTE: fencing is not shown, you must configure fencing appropriately for your cl <para> There are some built-in exchanges created automatically by the broker, these exchangs are never replicated. The built-in exchanges are the default (nameless) - exchange, the AMQP standard exchanges (amq.direct, amq.topic, amq.fanout and - amq.match) and the management exchanges (qpid.management, qmf.default.direct and - qmf.default.topic) + exchange, the AMQP standard exchanges (<literal>amq.direct, amq.topic, amq.fanout</literal> and + <literal>amq.match</literal>) and the management exchanges (<literal>qpid.management, qmf.default.direct</literal> and + <literal>qmf.default.topic</literal>) + </para> + <para> + Note that if you bind a replicated queue to one of these exchanges, the + binding wil <emphasis>not</emphasis> be replicated, so the queue will not + have the binding after a fail-over. </para> </section> |
