Skip to content

Commit

Permalink
fix: set max.in.flight.requests.per.connection to 1 (#391)
Browse files Browse the repository at this point in the history
This preserves order when enable.idempotency is false
  • Loading branch information
dpcollins-google committed Jan 23, 2023
1 parent ff2664a commit 62800a8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public static Map<String, Object> getProducerParams(
ProjectIdOrNumber project, CloudRegion region) {
HashMap<String, Object> params = new HashMap<>();
params.put("enable.idempotence", false);
// While ENABLE_IDEMPOTENCE_CONFIG is false, this must be 1 to preserver ordering.
params.put("max.in.flight.requests.per.connection", 1);
params.put("bootstrap.servers", getEndpoint(region));
params.put("security.protocol", "SASL_SSL");
params.put("sasl.mechanism", "OAUTHBEARER");
Expand Down

0 comments on commit 62800a8

Please sign in to comment.