Update apache-kafka-2/src/main/java/com/baeldung/kafka/message/ordering/ProducerConfigurations.java

Co-authored-by: Liam Williams <liam.williams@zoho.com>
This commit is contained in:
Amol Gote 2023-10-15 15:57:42 -04:00 committed by GitHub
parent c4aac70277
commit 1d1aaeedb6
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ public class ProducerConfigurations {
props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
props.put("max.in.flight.requests.per.connection", "1");
props.put("batch.size", "16384");
props.put("linger.ms", "5");
props.put(ProducerConfig.LINGER_MS_CONFIG, "5");
KafkaProducer<String, String> producer = new KafkaProducer<>(props);
for (int i = 0; i < 10; i++) {