diff options
author | Alan Conway <aconway@apache.org> | 2008-12-09 20:08:47 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-12-09 20:08:47 +0000 |
commit | 854d7472c441248cefa783a34606c5ba8bf053ec (patch) | |
tree | 404ac91e8412032112db368175c61fe1b97942f5 /cpp/src/qpid/cluster/ClusterPlugin.cpp | |
parent | f2bec6c366dc14c9a24dd753adaf798503e87e2e (diff) | |
download | qpid-python-854d7472c441248cefa783a34606c5ba8bf053ec.tar.gz |
Cluster: Option --cluster-read-max configures read-to-redeliver flow-control.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@724857 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterPlugin.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/ClusterPlugin.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 02e6fffb71..5e6a5049a5 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -41,8 +41,10 @@ struct ClusterValues { string name; string url; bool quorum; + size_t readMax; - ClusterValues() : quorum(false) {} + // FIXME aconway 2008-12-09: revisit default. + ClusterValues() : quorum(false), readMax(4) {} Url getUrl(uint16_t port) const { if (url.empty()) return Url::getIpAddressesUrl(port); @@ -66,6 +68,7 @@ struct ClusterOptions : public Options { #if HAVE_LIBCMAN ("cluster-cman", optValue(values.quorum), "Integrate with Cluster Manager (CMAN) cluster.") #endif + ("cluster-read-max", optValue(values.readMax,"N"), "Max un-delivered reads per client connection, 0 means unlimited.") ; } }; @@ -85,7 +88,7 @@ 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); + cluster = new Cluster(values.name, values.getUrl(broker->getPort(Broker::TCP_TRANSPORT)), *broker, values.quorum, values.readMax); broker->setConnectionFactory( boost::shared_ptr<sys::ConnectionCodec::Factory>( new ConnectionCodec::Factory(broker->getConnectionFactory(), *cluster))); |