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:58:43 -04:00 committed by GitHub
parent 463e45d025
commit 836c977fde
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import java.util.Properties;
public class ProducerConfigurations { public class ProducerConfigurations {
public static void main(String[] args) { public static void main(String[] args) {
Properties props = new Properties(); Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092"); props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
props.put(ProducerConfig.MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION, "1"); props.put(ProducerConfig.MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION, "1");