public class ApplicationConfiguration
{
@Bean
- public RestProducer restProducer(
+ public ExampleProducer exampleProducer(
ApplicationProperties properties,
KafkaProducer<String, String> kafkaProducer)
{
return
- new RestProducer(
+ new ExampleProducer(
properties.getClientId(),
properties.getTopic(),
properties.getPartition(),
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;
import org.springframework.web.bind.annotation.*;
@RequestMapping
@ResponseBody
@RequiredArgsConstructor
-public class RestProducer
+public class ExampleProducer
{
private final String id;
private final String topic;