Später benötigten Konfiurations-Parameter `partition` hinzugefügt
[demos/kafka/training] / src / main / java / de / juplo / kafka / RestProducer.java
index bfea3ca..0f35600 100644 (file)
@@ -19,6 +19,7 @@ public class RestProducer
 {
   private final String id;
   private final String topic;
+  private final Integer partition;
   private final KafkaProducer<String, String> 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());