summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/Queue.cpp
diff options
context:
space:
mode:
authorCarl C. Trieloff <cctrieloff@apache.org>2008-12-16 21:41:01 +0000
committerCarl C. Trieloff <cctrieloff@apache.org>2008-12-16 21:41:01 +0000
commitc5d4420b0bf574200158ba943d74f9bfd13ad56e (patch)
tree7420561262882208ce9936f4a6e6e2dad3255709 /cpp/src/qpid/broker/Queue.cpp
parent66d295bf47c6c91ecd2b1e7054d44e877429f1ed (diff)
downloadqpid-python-c5d4420b0bf574200158ba943d74f9bfd13ad56e.tar.gz
LVQ queue option for no acquire
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@727166 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Queue.cpp')
-rw-r--r--cpp/src/qpid/broker/Queue.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp
index 22659ec26c..4880dda553 100644
--- a/cpp/src/qpid/broker/Queue.cpp
+++ b/cpp/src/qpid/broker/Queue.cpp
@@ -61,6 +61,7 @@ const std::string qpidNoLocal("no-local");
const std::string qpidTraceIdentity("qpid.trace.id");
const std::string qpidTraceExclude("qpid.trace.exclude");
const std::string qpidLastValueQueue("qpid.last_value_queue");
+const std::string qpidLastValueQueueNoAcquire("qpid.last_value_queue_no_acquire");
const std::string qpidPersistLastNode("qpid.persist_last_node");
const std::string qpidVQMatchProperty("qpid.LVQ_key");
}
@@ -79,6 +80,7 @@ Queue::Queue(const string& _name, bool _autodelete,
exclusive(0),
noLocal(false),
lastValueQueue(false),
+ lastValueQueueNoAcquire(false),
persistLastNode(false),
inLastNodeFailure(false),
persistenceId(0),
@@ -213,7 +215,7 @@ bool Queue::acquire(const QueuedMessage& msg) {
|| (lastValueQueue && (i->position == msg.position) &&
msg.payload.get() == checkLvqReplace(*i).payload.get()) ) {
- clearLVQIndex(msg);
+ if (!lastValueQueueNoAcquire) clearLVQIndex(msg);
messages.erase(i);
QPID_LOG(debug, "Match found, acquire succeeded: " << i->position << " == " << msg.position);
return true;
@@ -673,6 +675,12 @@ void Queue::configure(const FieldTable& _settings)
lastValueQueue= _settings.get(qpidLastValueQueue);
if (lastValueQueue) QPID_LOG(debug, "Configured queue as Last Value Queue");
+ lastValueQueueNoAcquire = _settings.get(qpidLastValueQueueNoAcquire);
+ if (lastValueQueueNoAcquire){
+ QPID_LOG(debug, "Configured queue as Last Value Queue No Acquire");
+ lastValueQueue = lastValueQueueNoAcquire;
+ }
+
persistLastNode= _settings.get(qpidPersistLastNode);
if (persistLastNode) QPID_LOG(debug, "Configured queue to Persist data if cluster fails to one node");