IdlePartitionEventInterval was added, but the value is never retrieved from configuration. Adding support to set the value from configuration. No Issue found related to this.

Comment From: pivotal-cla

@pascal-ayotte Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@pascal-ayotte Thank you for signing the Contributor License Agreement!

Comment From: wilkinsona

Thanks for the pull request, @pascal-ayotte. The changes as currently proposed do not compile as there's no getIdlePartitionEventInterval() event on org.springframework.boot.autoconfigure.kafka.KafkaProperties.Listener.

It looks like support for this was added in Spring Kafka 2.7. @garyrussell do you think it makes sense to add a configuration property for this?

Comment From: garyrussell

@wilkinsona It's not a commonly used property; I typically recommend setting such properties in some other bean definition...

@Bean
SomeOtherBean otherBean(ConcurrentKafkaListenerContainerFactory<?, ?> factory() {
    factory.getContainerProperties().set...
    ...
    return someOtherBean;
}

There are many such properties; we typically only expose common properties as Boot properties (similar to the earlier discussions about the many Kafka consumer and producer properties).

OTOH, in the past, we have added them to Boot's properties on-demand when requested (often via user contributions).

Comment From: wilkinsona

Thanks, Gary. This one feels a little bit different to me as there's a setter on container factory whereas other additions (such as https://github.com/spring-projects/spring-boot/issues/19220) have directly mapped one of our properties to a Kafka property.

It doesn't sound like you have an objection so I think it makes sense to add this one, particularly given the setter in Spring Kafka.

@pascal-ayotte Do you have time to update your proposal to add a private Duration idlePartitionEventInterval field to KafkaProperties and the corresponding getter and setter methods?

Comment From: garyrussell

@wilkinsona I have no objections either way (but, for clarity, the setter is not on the factory, but on the factory's containerProperties). The parameter name container is a bit misleading.

Comment From: pascal-ayotte

@wilkinsona thanks for the feedback and sorry for the delay, I'll look into adding the idlePartitionEventInterval field to KafkaProperties and the corresponding getter and setter methods.

Comment From: snicoll

@pascal-ayotte thank you for making your first contribution to Spring Boot.