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 | 434a1368666171b2e213de56ebfea7dccc89e7ff (patch) | |
| tree | aab034840aa77f69a04089b8173054dc51ea9869 /cpp/src/qpid/ha/QueueReplicator.cpp | |
| parent | 485feb0bbadd5a4404953a1bdaebe7c5eadfe463 (diff) | |
| download | qpid-python-434a1368666171b2e213de56ebfea7dccc89e7ff.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. |
