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/broker/Queue.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cpp/src/qpid/broker/Queue.h') diff --git a/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h index e0bcc25fa3..394b5fd054 100644 --- a/cpp/src/qpid/broker/Queue.h +++ b/cpp/src/qpid/broker/Queue.h @@ -50,6 +50,7 @@ namespace qpid { namespace broker { class Broker; class MessageStore; + class QueueEvents; class QueueRegistry; class TransactionContext; class Exchange; @@ -96,6 +97,8 @@ namespace qpid { framing::SequenceNumber sequence; qmf::org::apache::qpid::broker::Queue* mgmtObject; RateTracker dequeueTracker; + int eventMode; + QueueEvents* eventMgr; void push(boost::intrusive_ptr& msg); void setPolicy(std::auto_ptr policy); @@ -166,6 +169,7 @@ namespace qpid { void unbind(ExchangeRegistry& exchanges, Queue::shared_ptr shared_ref); bool acquire(const QueuedMessage& msg); + bool acquireMessageAt(const qpid::framing::SequenceNumber& position, QueuedMessage& message); /** * Delivers a message to the queue. Will record it as @@ -279,6 +283,8 @@ namespace qpid { * Used by cluster to replicate queues. */ void setPosition(framing::SequenceNumber pos); + int getEventMode(); + void setQueueEventManager(QueueEvents&); }; } } -- cgit v1.2.1