From: Kai Moritz Date: Fri, 9 Jun 2023 09:16:42 +0000 (+0200) Subject: Beispiele verwenden das Interface, um die erzeugte Instanz abzulegen X-Git-Tag: producer/rest-producer--headers---2023-06-signal~9 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=1c5f9e1d8f4ccacc8c8365d24b290159567e091f;p=demos%2Fkafka%2Ftraining Beispiele verwenden das Interface, um die erzeugte Instanz abzulegen --- diff --git a/src/main/java/de/juplo/kafka/RestProducer.java b/src/main/java/de/juplo/kafka/RestProducer.java index debe366..cecb980 100644 --- a/src/main/java/de/juplo/kafka/RestProducer.java +++ b/src/main/java/de/juplo/kafka/RestProducer.java @@ -2,6 +2,7 @@ package de.juplo.kafka; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import org.springframework.http.HttpStatus; @@ -20,7 +21,7 @@ public class RestProducer private final String id; private final String topic; private final Integer partition; - private final KafkaProducer producer; + private final Producer producer; private long produced = 0;