import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import java.time.Clock;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class ApplicationConfiguration
{
@Bean
- public KeyCountingRecordHandler keyCountingRecordHandler()
+ public RecordHandler noopRecordHandler()
{
- return new KeyCountingRecordHandler();
- }
-
- @Bean
- public KeyCountingRebalanceListener keyCountingRebalanceListener(
- KeyCountingRecordHandler keyCountingRecordHandler,
- PartitionStatisticsRepository repository,
- ApplicationProperties properties)
- {
- return new KeyCountingRebalanceListener(
- keyCountingRecordHandler,
- repository,
- properties.getClientId(),
- Clock.systemDefaultZone(),
- properties.getCommitInterval());
+ return record -> {};
}
@Bean
public EndlessConsumer<String, Long> endlessConsumer(
KafkaConsumer<String, Long> kafkaConsumer,
ExecutorService executor,
- KeyCountingRebalanceListener keyCountingRebalanceListener,
- KeyCountingRecordHandler keyCountingRecordHandler,
+ RecordHandler noopRecordHandler,
ApplicationProperties properties)
{
return
properties.getClientId(),
properties.getTopic(),
kafkaConsumer,
- keyCountingRebalanceListener,
- keyCountingRecordHandler);
+ noopRecordHandler);
}
@Bean