import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import java.time.Clock;
import java.util.Optional;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
{
return new ApplicationRecordHandler(
adderResults,
- Optional.ofNullable(properties.getThrottle()));
+ Optional.ofNullable(properties.getThrottle()),
+ properties.getClientId());
}
@Bean
@Bean
public ApplicationRebalanceListener rebalanceListener(
- KafkaConsumer<String, String> kafkaConsumer,
ApplicationRecordHandler recordHandler,
AdderResults adderResults,
StateRepository stateRepository,
ApplicationProperties properties)
{
return new ApplicationRebalanceListener(
- kafkaConsumer,
recordHandler,
adderResults,
stateRepository,
Properties props = new Properties();
props.put("bootstrap.servers", properties.getBootstrapServer());
- props.put("partition.assignment.strategy", "org.apache.kafka.clients.consumer.CooperativeStickyAssignor");
+ props.put("partition.assignment.strategy", "org.apache.kafka.clients.consumer.StickyAssignor");
props.put("group.id", properties.getGroupId());
props.put("client.id", properties.getClientId());
props.put("auto.offset.reset", properties.getAutoOffsetReset());