From da2753f9670cb364a4c9e4603021c052f4328a51 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 2 Nov 2024 19:31:35 +0100 Subject: [PATCH] WIP --- src/main/java/de/juplo/kafka/ApplicationConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java index 8437bb4..3057dfa 100644 --- a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java +++ b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java @@ -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 -- 2.20.1