From e46c3c0a19af0fd659cfe018c34db1c0dfd498c5 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 15 Jan 2009 11:29:38 +0000 Subject: QPID-1567: Initial support for asynchronous queue state replication * Added QueueEvents class with per broker instance * Modified qpid::broker::Queue to notify QueueEvents of enqueues and dequeues (based on configuration) * Added replication subdir containing two plugins: - an event listener that registers with QueueEvents and creates messages representing received events on a replication queue - a custom exchange type for processing messages of the format created by the listener plugin * Added new option for controlling event generation to qpid::client::QueueOptions * Added new queue option to qpid-config script for the same git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@734674 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/QueueOptions.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpp/src/qpid/client/QueueOptions.cpp') diff --git a/cpp/src/qpid/client/QueueOptions.cpp b/cpp/src/qpid/client/QueueOptions.cpp index ac65b0bc22..5493c05044 100644 --- a/cpp/src/qpid/client/QueueOptions.cpp +++ b/cpp/src/qpid/client/QueueOptions.cpp @@ -24,6 +24,8 @@ namespace qpid { namespace client { +enum QueueEventGeneration {ENQUEUE_ONLY=1, ENQUEUE_AND_DEQUEUE=2}; + QueueOptions::QueueOptions() {} @@ -39,6 +41,7 @@ const std::string QueueOptions::strLastValueQueue("qpid.last_value_queue"); const std::string QueueOptions::strPersistLastNode("qpid.persist_last_node"); const std::string QueueOptions::strLVQMatchProperty("qpid.LVQ_key"); const std::string QueueOptions::strLastValueQueueNoBrowse("qpid.last_value_queue_no_browse"); +const std::string QueueOptions::strQueueEventMode("qpid.queue_event_generation"); QueueOptions::~QueueOptions() @@ -109,6 +112,10 @@ void QueueOptions::clearOrdering() erase(strLastValueQueue); } +void QueueOptions::enableQueueEvents(bool enqueueOnly) +{ + setInt(strQueueEventMode, enqueueOnly ? ENQUEUE_ONLY : ENQUEUE_AND_DEQUEUE); +} } } -- cgit v1.2.1