From: Kai Moritz Date: Tue, 26 Jul 2022 19:15:35 +0000 (+0200) Subject: Später benötigten Konfiurations-Parameter `partition` hinzugefügt X-Git-Tag: customized---lvm-2-tage^2~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=8d17fe71196acb72060e8fae30289048e431752d;p=demos%2Fkafka%2Ftraining Später benötigten Konfiurations-Parameter `partition` hinzugefügt --- diff --git a/src/main/java/de/juplo/kafka/ApplicationProperties.java b/src/main/java/de/juplo/kafka/ApplicationProperties.java index 1f30262..c74f588 100644 --- a/src/main/java/de/juplo/kafka/ApplicationProperties.java +++ b/src/main/java/de/juplo/kafka/ApplicationProperties.java @@ -12,6 +12,7 @@ public class ApplicationProperties private String bootstrapServer; private String clientId; private String topic; + private Integer partition; private String acks; private Integer batchSize; private Integer lingerMs; diff --git a/src/main/java/de/juplo/kafka/RestProducer.java b/src/main/java/de/juplo/kafka/RestProducer.java index bfea3ca..0f35600 100644 --- a/src/main/java/de/juplo/kafka/RestProducer.java +++ b/src/main/java/de/juplo/kafka/RestProducer.java @@ -19,6 +19,7 @@ public class RestProducer { private final String id; private final String topic; + private final Integer partition; private final KafkaProducer producer; private long produced = 0; @@ -27,6 +28,7 @@ public class RestProducer { this.id = properties.getClientId(); this.topic = properties.getTopic(); + this.partition = properties.getPartition(); Properties props = new Properties(); props.put("bootstrap.servers", properties.getBootstrapServer());