WIP
authorKai Moritz <kai@juplo.de>
Sat, 2 Nov 2024 18:31:35 +0000 (19:31 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 9 Nov 2024 15:49:53 +0000 (16:49 +0100)
src/main/java/de/juplo/kafka/ApplicationConfiguration.java

index 8437bb4..3057dfa 100644 (file)
@@ -48,6 +48,7 @@ public class ApplicationConfiguration
     props.put("client.id", properties.getClientId());
     props.put("group.id", properties.getConsumerProperties().getGroupId());
     props.put("enable.auto.commit", false);
+    props.put("isolation.level", "read_committed");
     if (properties.getConsumerProperties().getAutoOffsetReset() != null)
     {
       props.put("auto.offset.reset", properties.getConsumerProperties().getAutoOffsetReset().name());
@@ -70,7 +71,7 @@ public class ApplicationConfiguration
     Properties props = new Properties();
     props.put("bootstrap.servers", properties.getBootstrapServer());
     props.put("client.id", properties.getClientId());
-    props.put("transactional.id", "my-tx");
+    props.put("transactional.id", properties.getClientId());
     props.put("acks", properties.getProducerProperties().getAcks());
     props.put("batch.size", properties.getProducerProperties().getBatchSize());
     props.put("metadata.maxage.ms",   5000); //  5 Sekunden