From da669e5182ba84da83817313073777d4f8a3bd00 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 22 Dec 2009 14:22:17 +0000 Subject: QPID-2296: Cluster errors when using acquire-mode-not-acquired Replicate consumer's queue position to new cluster nodes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@893175 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Connection.cpp | 3 ++- cpp/src/qpid/cluster/Connection.h | 2 +- cpp/src/qpid/cluster/UpdateClient.cpp | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/cluster') diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 2eda84ae11..d223244f15 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -269,9 +269,10 @@ broker::SemanticState& Connection::semanticState() { return sessionState().getSemanticState(); } -void Connection::consumerState(const string& name, bool blocked, bool notifyEnabled) +void Connection::consumerState(const string& name, bool blocked, bool notifyEnabled, const SequenceNumber& position) { broker::SemanticState::ConsumerImpl& c = semanticState().find(name); + c.position = position; c.setBlocked(blocked); if (notifyEnabled) c.enableNotify(); else c.disableNotify(); consumerNumbering.add(c.shared_from_this()); diff --git a/cpp/src/qpid/cluster/Connection.h b/cpp/src/qpid/cluster/Connection.h index 57cca865db..7f94338348 100644 --- a/cpp/src/qpid/cluster/Connection.h +++ b/cpp/src/qpid/cluster/Connection.h @@ -108,7 +108,7 @@ class Connection : // Called for data delivered from the cluster. void deliveredFrame(const EventFrame&); - void consumerState(const std::string& name, bool blocked, bool notifyEnabled); + void consumerState(const std::string& name, bool blocked, bool notifyEnabled, const qpid::framing::SequenceNumber& position); // ==== Used in catch-up mode to build initial state. // diff --git a/cpp/src/qpid/cluster/UpdateClient.cpp b/cpp/src/qpid/cluster/UpdateClient.cpp index 279284da2c..b20cc907a2 100644 --- a/cpp/src/qpid/cluster/UpdateClient.cpp +++ b/cpp/src/qpid/cluster/UpdateClient.cpp @@ -381,7 +381,8 @@ void UpdateClient::updateConsumer( ClusterConnectionProxy(shadowSession).consumerState( ci->getName(), ci->isBlocked(), - ci->isNotifyEnabled() + ci->isNotifyEnabled(), + ci->position ); consumerNumbering.add(ci); -- cgit v1.2.1