public class ApplicationConfiguration
{
@Bean
- public ApplicationRecordHandler recordHandler()
+ public ApplicationRecordHandler recordHandler(AdderResults adderResults)
{
- return new ApplicationRecordHandler();
+ return new ApplicationRecordHandler(adderResults);
+ }
+
+ @Bean
+ public AdderResults adderResults()
+ {
+ return new AdderResults();
}
@Bean
public ApplicationRebalanceListener rebalanceListener(
ApplicationRecordHandler recordHandler,
+ AdderResults adderResults,
StateRepository stateRepository,
ApplicationProperties properties)
{
return new ApplicationRebalanceListener(
recordHandler,
+ adderResults,
stateRepository,
properties.getClientId(),
Clock.systemDefaultZone(),
props.put("group.id", properties.getGroupId());
props.put("client.id", properties.getClientId());
props.put("auto.offset.reset", properties.getAutoOffsetReset());
+ props.put("auto.commit.interval.ms", (int)properties.getCommitInterval().toMillis());
props.put("metadata.max.age.ms", "1000");
props.put("key.deserializer", StringDeserializer.class.getName());
props.put("value.deserializer", StringDeserializer.class.getName());