summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Cluster.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-08-12 21:08:51 +0000
committerAlan Conway <aconway@apache.org>2009-08-12 21:08:51 +0000
commitdbb447da624494db2f376837feab22fb5db989fb (patch)
tree5bcb4453684684044c398e6b859ce88a9e5b9c56 /cpp/src/qpid/cluster/Cluster.cpp
parent46d8b08d69df128bbb08178dd57d8da4caa67c53 (diff)
downloadqpid-python-dbb447da624494db2f376837feab22fb5db989fb.tar.gz
Batch multiple events into a single CPG multicast.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@803713 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Cluster.cpp')
-rw-r--r--cpp/src/qpid/cluster/Cluster.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp
index e35d3e4175..7bdc066767 100644
--- a/cpp/src/qpid/cluster/Cluster.cpp
+++ b/cpp/src/qpid/cluster/Cluster.cpp
@@ -323,9 +323,11 @@ void Cluster::deliver(
{
MemberId from(nodeid, pid);
framing::Buffer buf(static_cast<char*>(msg), msg_len);
- Event e(Event::decodeCopy(from, buf));
- LATENCY_TRACK(if (e.getConnectionId().getMember() == self) mcast.cpgLatency.finish());
- deliverEvent(e);
+ while (buf.available()) {
+ Event e(Event::decodeCopy(from, buf));
+ LATENCY_TRACK(if (e.getConnectionId().getMember() == self) mcast.cpgLatency.finish());
+ deliverEvent(e);
+ }
}
LATENCY_TRACK(sys::LatencyTracker<const char*> eventQueueLatencyTracker("EventQueue");)