summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/ha/QueueReplicator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/ha/QueueReplicator.cpp')
-rw-r--r--cpp/src/qpid/ha/QueueReplicator.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/src/qpid/ha/QueueReplicator.cpp b/cpp/src/qpid/ha/QueueReplicator.cpp
index ff32dfef16..b4bbb3a0c4 100644
--- a/cpp/src/qpid/ha/QueueReplicator.cpp
+++ b/cpp/src/qpid/ha/QueueReplicator.cpp
@@ -169,6 +169,11 @@ void QueueReplicator::activate() {
boost::shared_ptr<QueueObserver>(new QueueObserver(shared_from_this())));
}
+void QueueReplicator::disconnect() {
+ Mutex::ScopedLock l(lock);
+ sessionHandler = 0;
+}
+
QueueReplicator::~QueueReplicator() {}
// Called from Queue::destroyed()
@@ -220,6 +225,14 @@ void QueueReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHa
QPID_LOG(trace, logPrefix << "Subscription arguments: " << arguments);
}
+void QueueReplicator::cancel(Mutex::ScopedLock&) {
+ if (sessionHandler) {
+ // Cancel the replicating subscription.
+ AMQP_ServerProxy peer(sessionHandler->out);
+ peer.getMessage().cancel(getName());
+ }
+}
+
namespace {
template <class T> T decodeContent(Message& m) {
std::string content = m.getContent();