Update apache-kafka-2/src/main/java/com/baeldung/kafka/message/ordering/SinglePartitionProducer.java
Co-authored-by: Liam Williams <liam.williams@zoho.com>
This commit is contained in:
parent
d850d6c30c
commit
d85a01e524
|
@ -11,7 +11,7 @@ public class SinglePartitionProducer {
|
|||
public static void main(String[] args) {
|
||||
Properties props = new Properties();
|
||||
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092")
|
||||
props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
|
||||
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringSerializer");
|
||||
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, "com.baeldung.kafka.message.ordering.serialization.JacksonSerializer");
|
||||
|
||||
KafkaProducer<String, Message> producer = new KafkaProducer<>(props);
|
||||
|
|
Loading…
Reference in New Issue