From: Kai Moritz Date: Wed, 24 Jan 2024 21:04:39 +0000 (+0100) Subject: WIP X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=ad1aeeeb8d883b0fc3245ed508cc63dc363448b4;p=demos%2Fkafka%2Ftraining WIP --- diff --git a/pom.xml b/pom.xml index 2928676..1c6d364 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,16 @@ ch.qos.logback logback-classic + + org.springframework.kafka + spring-kafka-test + test + + + org.awaitility + awaitility + test + diff --git a/src/main/java/de/juplo/kafka/SimpleProducer.java b/src/main/java/de/juplo/kafka/SimpleProducer.java index db554d7..06d28ff 100644 --- a/src/main/java/de/juplo/kafka/SimpleProducer.java +++ b/src/main/java/de/juplo/kafka/SimpleProducer.java @@ -25,6 +25,7 @@ public class SimpleProducer Properties props = new Properties(); props.put("bootstrap.servers", broker); props.put("client.id", clientId); // Nur zur Wiedererkennung + props.put("transactional.id", clientId); // Aktiviert außerdem enable.idempotence=true props.put("key.serializer", StringSerializer.class.getName()); props.put("value.serializer", StringSerializer.class.getName());