diff options
author | Alan Conway <aconway@apache.org> | 2009-01-09 04:50:35 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-01-09 04:50:35 +0000 |
commit | 11e35dd461a19e23053756cee5c4ec214fa5597f (patch) | |
tree | 8095750bea88b52ba9333cf0f35b3fc5e3ebaccf /cpp/src/qpid/cluster/ClusterPlugin.cpp | |
parent | 92cbb60068d48c36108cb9e3ec436d2808428d15 (diff) | |
download | qpid-python-11e35dd461a19e23053756cee5c4ec214fa5597f.tar.gz |
Added --cluster-read-max: max number of outstanding mcasts in CPG buffers.
Work around problems with CPG flow control.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@732925 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterPlugin.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/ClusterPlugin.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 783e4e5009..7f3a9ac6aa 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -41,10 +41,10 @@ struct ClusterValues { string name; string url; bool quorum; - size_t readMax, writeEstimate; + size_t readMax, writeEstimate, mcastMax; // FIXME aconway 2008-12-09: revisit default. - ClusterValues() : quorum(false), readMax(0), writeEstimate(64) {} + ClusterValues() : quorum(false), readMax(10), writeEstimate(64), mcastMax(10) {} Url getUrl(uint16_t port) const { if (url.empty()) return Url::getIpAddressesUrl(port); @@ -69,10 +69,11 @@ struct ClusterOptions : public Options { ("cluster-cman", optValue(values.quorum), "Integrate with Cluster Manager (CMAN) cluster.") #endif ("cluster-read-max", optValue(values.readMax,"N"), - "Experimental: Throttle read rate from client connections.") + "Experimental: Max unreplicated reads per connetion connection. 0=no limit.") + ("cluster-mcast-max", optValue(values.mcastMax,"N"), + "Experimental: Max outstanding multicasts per broker. 0=no limit.") ("cluster-write-estimate", optValue(values.writeEstimate, "Kb"), - "Experimental: initial estimate for connection write per multicast cycle") - ; + "Experimental: initial estimate for connection writes rate per multicast cycle"); } }; @@ -91,7 +92,13 @@ struct ClusterPlugin : public Plugin { if (values.name.empty()) return; // Only if --cluster-name option was specified. Broker* broker = dynamic_cast<Broker*>(&target); if (!broker) return; - cluster = new Cluster(values.name, values.getUrl(broker->getPort(Broker::TCP_TRANSPORT)), *broker, values.quorum, values.readMax, values.writeEstimate*1024); + cluster = new Cluster( + values.name, + values.getUrl(broker->getPort(Broker::TCP_TRANSPORT)), + *broker, + values.quorum, + values.readMax, values.writeEstimate*1024, values.mcastMax + ); broker->setConnectionFactory( boost::shared_ptr<sys::ConnectionCodec::Factory>( new ConnectionCodec::Factory(broker->getConnectionFactory(), *cluster))); |