public class Application
{
@Bean
- public EndlessProducer producer(
+ public ExampleProducer producer(
ApplicationProperties properties,
@Value("${spring.kafka.client-id:DEV}") String clientId,
KafkaTemplate<String, String> kafkaTemplate)
{
- EndlessProducer producer =
- new EndlessProducer(
+ ExampleProducer producer =
+ new ExampleProducer(
Executors.newFixedThreadPool(1),
clientId,
properties.getThrottleMs(),
@Slf4j
-public class EndlessProducer implements Runnable
+public class ExampleProducer implements Runnable
{
private final ExecutorService executor;
private final String id;
private long i = 0;
private long produced = 0;
- public EndlessProducer(
+ public ExampleProducer(
ExecutorService executor,
String clientId,
int throttleMs,