From 1fe3f166e5db96aae1253343c1eaea3d48b01316 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 12 Nov 2013 13:42:50 +0000 Subject: QPID-5251: allow policies to be specified that will create topics or queues on demand if they match the specified pattern git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1541059 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/QueueSettings.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cpp/src/qpid/broker/QueueSettings.cpp') diff --git a/cpp/src/qpid/broker/QueueSettings.cpp b/cpp/src/qpid/broker/QueueSettings.cpp index 53194cf064..8de8539579 100644 --- a/cpp/src/qpid/broker/QueueSettings.cpp +++ b/cpp/src/qpid/broker/QueueSettings.cpp @@ -62,6 +62,7 @@ const std::string FILTER("qpid.filter"); const std::string LIFETIME_POLICY("qpid.lifetime-policy"); const std::string DELETE_IF_UNUSED_KEY("delete-if-unused"); const std::string DELETE_IF_UNUSED_AND_EMPTY_KEY("delete-if-unused-and-empty"); +const std::string MANUAL("manual"); const std::string LVQ_LEGACY("qpid.last_value_queue"); const std::string LVQ_LEGACY_KEY("qpid.LVQ_key"); @@ -227,8 +228,12 @@ bool QueueSettings::handle(const std::string& key, const qpid::types::Variant& v } else if (key == LIFETIME_POLICY) { if (value.asString() == DELETE_IF_UNUSED_KEY) { lifetime = DELETE_IF_UNUSED; + autodelete = true; } else if (value.asString() == DELETE_IF_UNUSED_AND_EMPTY_KEY) { lifetime = DELETE_IF_UNUSED_AND_EMPTY; + autodelete = true; + } else if (value.asString() == MANUAL) { + autodelete = false; } else { QPID_LOG(warning, "Invalid value for " << LIFETIME_POLICY << ": " << value); } -- cgit v1.2.1