import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.core.task.TaskExecutor;
import org.springframework.kafka.core.ConsumerFactory;
{
@Bean
public SimpleConsumer endlessConsumer(
- TaskExecutor taskExecutor,
Consumer<String, String> kafkaConsumer,
KafkaProperties kafkaProperties,
ApplicationProperties applicationProperties)
{
return
new SimpleConsumer(
- taskExecutor,
kafkaProperties.getClientId(),
applicationProperties.getTopic(),
kafkaConsumer);