Skip to content

Commit

Permalink
Removed ability to disable connection pool (apache#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
jai1 authored and merlimat committed Apr 17, 2017
1 parent df34ae7 commit 6099e88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,13 @@ public int getConnectionsPerBroker() {
* 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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static class Arguments {

@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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static class Arguments {

@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")
Expand Down

0 comments on commit 6099e88

Please sign in to comment.