diff options
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))); |