diff options
Diffstat (limited to 'cpp/src/qpid/broker/Consumer.h')
-rw-r--r-- | cpp/src/qpid/broker/Consumer.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/cpp/src/qpid/broker/Consumer.h b/cpp/src/qpid/broker/Consumer.h index 317338a8ad..2af9b0c121 100644 --- a/cpp/src/qpid/broker/Consumer.h +++ b/cpp/src/qpid/broker/Consumer.h @@ -36,13 +36,19 @@ class Consumer { // inListeners allows QueueListeners to efficiently track if this instance is registered // for notifications without having to search its containers bool inListeners; - public: - typedef boost::shared_ptr<Consumer> shared_ptr; - + // the name is generated by broker and is unique within broker scope. It is not + // provided or known by the remote Consumer. + const std::string name; + public: + typedef boost::shared_ptr<Consumer> shared_ptr; + framing::SequenceNumber position; - - Consumer(bool preAcquires = true) : acquires(preAcquires), inListeners(false) {} + + Consumer(const std::string& _name, bool preAcquires = true) + : acquires(preAcquires), inListeners(false), name(_name), position(0) {} bool preAcquires() const { return acquires; } + const std::string& getName() const { return name; } + virtual bool deliver(QueuedMessage& msg) = 0; virtual void notify() = 0; virtual bool filter(boost::intrusive_ptr<Message>) { return true; } |