summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/ha
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-04-07 21:22:55 +0000
committerAlan Conway <aconway@apache.org>2014-04-07 21:22:55 +0000
commita6f044f40d70b73c320cc909169e3518909365e2 (patch)
treea23df30ce4b52f1d23e55a0afa0e90c1fa20ffd6 /qpid/cpp/src/qpid/ha
parent8ea0f79d78edd0a0825547ecc618e3fa63a2b93f (diff)
downloadqpid-python-a6f044f40d70b73c320cc909169e3518909365e2.tar.gz
QPID-5560: HA tests do not use AMQP 1.0
The HA tests were using only AMQP 0-10. Modified the tests to use AMQP 1.0 if available (still use 0-10 if 1.0 is not available) Fixed bugs uncovered both in the tests and in the AMQP 1.0 implementation. Summary of changes: - brokertest.py: configurable support for of swig vs. native and amqp0-10 vs. 1.0 - default to swig+amqp1.0 if swig is available, native+amqp0-10 otherwise - qpidtoollibs/broker.py: enable use of swig client with BrokerAgent - Swig python client: - support for passing client_properties/properties. - expose AddressHelper pn_data read/write as PnData helper class - set sender/receiver capacity on creation - limited disposition support - rejected messages. - support for additional timeout parameters - expose messaging::Logger, allow log configuration to be set from python. - ha_tests.py: - bind, delete policies not supported by AMQP 1.0, switched to using BrokerAgent QMF. - pass protocol:amqp1.0 connection-option to c++ test clients (qpid-send, qpid-receive) - TX tests forsce use of 0-10 protocol (but still with Swig client if enabled.) - Broker fixes: - Queue::Settings::isTemporary was set in the 0-10 SessionAdapter, moved to Broker::createQueue. - broker::amqp::Session was always setting an exclusive owner in createQueue git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1585588 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/ha')
-rw-r--r--qpid/cpp/src/qpid/ha/QueueReplicator.cpp8
-rw-r--r--qpid/cpp/src/qpid/ha/ReplicationTest.h2
2 files changed, 4 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
index 6881896f5e..4e908fbe79 100644
--- a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
+++ b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
@@ -156,7 +156,7 @@ QueueReplicator::QueueReplicator(HaBroker& hb,
args.setString(QPID_REPLICATE, printable(NONE).str());
setArgs(args);
// Don't allow backup queues to auto-delete, primary decides when to delete.
- if (q->isAutoDelete()) q->markInUse();
+ if (q->isAutoDelete()) q->markInUse(false);
dispatch[DequeueEvent::KEY] =
boost::bind(&QueueReplicator::dequeueEvent, this, _1, _2);
@@ -352,13 +352,13 @@ void QueueReplicator::promoted() {
queue->getMessageInterceptors().add(
boost::shared_ptr<IdSetter>(new IdSetter(maxId+1)));
// Process auto-deletes
- if (queue->isAutoDelete() && subscribed) {
+ if (queue->isAutoDelete()) {
// Make a temporary shared_ptr to prevent premature deletion of queue.
// Otherwise scheduleAutoDelete can call this->destroy, which resets this->queue
// which could delete the queue while it's still running it's destroyed logic.
boost::shared_ptr<Queue> q(queue);
- q->releaseFromUse();
- q->scheduleAutoDelete();
+ // See markInUse in ctor: release but don't delete if never used.
+ q->releaseFromUse(false/*controller*/, subscribed/*doDelete*/);
}
}
}
diff --git a/qpid/cpp/src/qpid/ha/ReplicationTest.h b/qpid/cpp/src/qpid/ha/ReplicationTest.h
index 8fe74ee959..8b19dc2ee0 100644
--- a/qpid/cpp/src/qpid/ha/ReplicationTest.h
+++ b/qpid/cpp/src/qpid/ha/ReplicationTest.h
@@ -64,8 +64,6 @@ class ReplicationTest
// Calculate level for objects that may not have replication set,
// including auto-delete/exclusive settings.
- ReplicateLevel useLevel(const types::Variant::Map& args, bool autodelete, bool exclusive) const;
- ReplicateLevel useLevel(const framing::FieldTable& args, bool autodelete, bool exclusive) const;
ReplicateLevel useLevel(const broker::Queue&) const;
ReplicateLevel useLevel(const broker::Exchange&) const;