diff options
author | Alan Conway <aconway@apache.org> | 2012-09-11 15:35:01 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-09-11 15:35:01 +0000 |
commit | fa4485993c1a0c2b691918ddfaa6748fa4b50971 (patch) | |
tree | aab034840aa77f69a04089b8173054dc51ea9869 /cpp/src/qpid/ha/QueueReplicator.cpp | |
parent | 03fbf27d2f43a039263cf04448951e49d4c21f1c (diff) | |
download | qpid-python-fa4485993c1a0c2b691918ddfaa6748fa4b50971.tar.gz |
NO-JIRA: Correct bug in ReplicatingSubscription::getNext - find next message *after* position.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1383453 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/ha/QueueReplicator.cpp')
-rw-r--r-- | cpp/src/qpid/ha/QueueReplicator.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/src/qpid/ha/QueueReplicator.cpp b/cpp/src/qpid/ha/QueueReplicator.cpp index ae53f89404..8baecb0e0f 100644 --- a/cpp/src/qpid/ha/QueueReplicator.cpp +++ b/cpp/src/qpid/ha/QueueReplicator.cpp @@ -120,10 +120,10 @@ void QueueReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHa settings.setTable(ReplicatingSubscription::QPID_BROKER_INFO, brokerInfo.asFieldTable()); SequenceNumber front; - if (ReplicatingSubscription::getFront(*queue, front)) { + if (ReplicatingSubscription::getFront(*queue, front)) settings.setInt(ReplicatingSubscription::QPID_FRONT, front); - QPID_LOG(debug, "QPID_FRONT for " << queue->getName() << " is " << front); - } + QPID_LOG(debug, logPrefix << " subscribe with settings " << settings); + peer.getMessage().subscribe( args.i_src, args.i_dest, 0/*accept-explicit*/, 1/*not-acquired*/, false/*exclusive*/, "", 0, settings); @@ -177,7 +177,8 @@ void QueueReplicator::route(Deliverable& msg) // Verify that there are no messages after the new position in the queue. SequenceNumber next; if (ReplicatingSubscription::getNext(*queue, position, next)) - throw Exception("Invalid position move, preceeds messages"); + throw Exception(QPID_MSG(logPrefix << "Invalid position " << position + << " preceeds message at " << next)); queue->setPosition(position); } // Ignore unknown event keys, may be introduced in later versions. |