From 8d17fe71196acb72060e8fae30289048e431752d Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 26 Jul 2022 21:15:35 +0200 Subject: [PATCH] =?utf8?q?Sp=C3=A4ter=20ben=C3=B6tigten=20Konfiurations-Pa?= =?utf8?q?rameter=20`partition`=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/ApplicationProperties.java | 1 + src/main/java/de/juplo/kafka/RestProducer.java | 2 ++ 2 files changed, 3 insertions(+) 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()); -- 2.20.1