提交 6099e88f 编写于 作者: J jai1 提交者: Matteo Merli

Removed ability to disable connection pool (#337)

上级 df34ae7c
......@@ -211,12 +211,13 @@ public class ClientConfiguration implements Serializable {
* By default, the connection pool will use a single connection for all the producers and consumers. Increasing this
* parameter may improve throughput when using many producers over a high latency connection.
* <p>
* Setting connections per broker to 0 will disable the connection pooling.
*
* @param connectionsPerBroker
* max number of connections
* max number of connections per broker (needs to be greater than 0)
*/
public void setConnectionsPerBroker(int connectionsPerBroker) {
checkArgument(connectionsPerBroker > 0,
"Connections per broker need to be greater than 0");
this.connectionsPerBroker = connectionsPerBroker;
}
......
......@@ -84,7 +84,7 @@ public class PerformanceConsumer {
@Parameter(names = { "-c",
"--max-connections" }, description = "Max number of TCP connections to a single broker")
public int maxConnections = 0;
public int maxConnections = 100;
@Parameter(names = { "-i",
"--stats-interval-seconds" }, description = "Statistics Interval Seconds. If 0, statistics will be disabled")
......
......@@ -111,7 +111,7 @@ public class PerformanceProducer {
@Parameter(names = { "-c",
"--max-connections" }, description = "Max number of TCP connections to a single broker")
public int maxConnections = 0;
public int maxConnections = 100;
@Parameter(names = { "-m",
"--num-messages" }, description = "Number of messages to publish in total. If 0, it will keep publishing")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册