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

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

View File

@ -11,7 +11,7 @@ public class MultiPartitionProducer {
Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
props.put("value.serializer", "com.baeldung.kafka.message.ordering.serialization.JacksonSerializer");
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, "com.baeldung.kafka.message.ordering.serialization.JacksonSerializer");
KafkaProducer<String, Message> producer = new KafkaProducer<>(props);
for (long insertPosition = 1; insertPosition <= 10 ; insertPosition++) {