diff options
author | Alan Conway <aconway@apache.org> | 2012-11-14 16:04:04 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-11-14 16:04:04 +0000 |
commit | 3b9fdc8e68cb42e6ebfa75f3dc756fd54369f735 (patch) | |
tree | 128d1ac54182753c4d8f2d49ce38a5d88bea7909 /qpid/cpp/src/qpid/broker/Queue.h | |
parent | bce4ad2c993a34d240b1166ab6321bc14b78c612 (diff) | |
download | qpid-python-3b9fdc8e68cb42e6ebfa75f3dc756fd54369f735.tar.gz |
QPID-4428: HA add UUID tag to avoid using an out of date queue/exchange.
Imagine a cluster with primary A and backups B and C. A queue Q is created on A
and replicated to B, C. Now A dies and B takes over as primary. Before C can
connect to B, a client destroys Q and creates a new queue with the same name.
When B connects it sees Q and incorrectly assumes it is the same Q that it has
already replicated. Now C has an inconsistent replica of Q.
The fix is to tag queues/exchanges with a UUID so a backup can tell if a queue
is not the same as the one it has already replicated, even if the names are the
same. This all also applies to exchanges.
- Minor imrovements to printing UUIDs in a FieldTable.
- Fix comparison of void Variants, added operator !=
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1409241 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/broker/Queue.h')
-rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h index 3fa8391d46..eecc8ce433 100644 --- a/qpid/cpp/src/qpid/broker/Queue.h +++ b/qpid/cpp/src/qpid/broker/Queue.h @@ -145,7 +145,7 @@ class Queue : public boost::enable_shared_from_this<Queue>, mutable qpid::sys::Mutex messageLock; mutable qpid::sys::Mutex ownershipLock; mutable uint64_t persistenceId; - const QueueSettings settings; + QueueSettings settings; qpid::framing::FieldTable encodableSettings; QueueDepth current; QueueBindings bindings; @@ -423,6 +423,10 @@ class Queue : public boost::enable_shared_from_this<Queue>, uint32_t getDequeueSincePurge() { return dequeueSincePurge.get(); } QPID_BROKER_EXTERN void setDequeueSincePurge(uint32_t value); + + /** Add an argument to be included in management messages about this queue. */ + void addArgument(const std::string& key, const types::Variant& value); + friend class QueueFactory; }; } |