From 1c5f9e1d8f4ccacc8c8365d24b290159567e091f Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 9 Jun 2023 11:16:42 +0200 Subject: [PATCH] Beispiele verwenden das Interface, um die erzeugte Instanz abzulegen --- src/main/java/de/juplo/kafka/RestProducer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1