The KafkaStreamsFunctionProcessor supports only a single StreamsBuilderFactoryBeanConfigurer.
Shouldn't it support a list of configurers?
The issue arose when upgrading to spring-boot-4.0.0 which has KafkaMetricsAutoConfiguration now in the spring-boot-kafka library.
My configurer was then silently ignored because getIfUnique returned null.
To Reproduce
- Consider a spring-boot-3.5.x project with a custom:
@Bean
public StreamsBuilderFactoryBeanConfigurer kafkaStreamsConfigurer() { ... }
- Upgrade to spring-boot-4.0.0
- Because of spring-kafka-4.0.0 a second StreamsBuilderFactoryBeanConfigurer will be in the context and both of them will be silently ignored now in the KafkaStreamsBinderSupportAutoConfiguration
Obviously this can easily be mitigated by adding @Primary to the custom Configurer if you don't care about the metrics like me.
Version of the framework
spring-cloud-2025.1.0
spring-boot-4.0.0
Expected behavior
Both Configurers are applied to the stream binding function.