Skip to content

Commit 62800a8

Browse files
fix: set max.in.flight.requests.per.connection to 1 (#391)
This preserves order when enable.idempotency is false
1 parent ff2664a commit 62800a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pubsublite-kafka-auth/src/main/java/com/google/cloud/pubsublite/kafka/ClientParameters.java

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public static Map<String, Object> getProducerParams(
3838
ProjectIdOrNumber project, CloudRegion region) {
3939
HashMap<String, Object> params = new HashMap<>();
4040
params.put("enable.idempotence", false);
41+
// While ENABLE_IDEMPOTENCE_CONFIG is false, this must be 1 to preserver ordering.
42+
params.put("max.in.flight.requests.per.connection", 1);
4143
params.put("bootstrap.servers", getEndpoint(region));
4244
params.put("security.protocol", "SASL_SSL");
4345
params.put("sasl.mechanism", "OAUTHBEARER");

0 commit comments

Comments
 (0)