Using the spring cloud stream with reactive used to work well by instanciating kotlin function as follows
@Configuration(proxyBeanMethods = false)
class MessageConfiguration {
@Bean
fun myMessageConsumer() = { rawMessagesFlux ->
rawMessagesFlux
.flatMap { // ... }
.then()
}
Moving to kotlin 2.0 fails as generated bean class returns false when passing it to KotlinDetector.isKotlinType. Hence starting of spring cloud stream module fails as KotlinFunctionWrapper is not put and the Configuration expects java Function, Consumer or Supplier ...
Using the spring cloud stream with reactive used to work well by instanciating kotlin function as follows
Moving to kotlin 2.0 fails as generated bean class returns
falsewhen passing it toKotlinDetector.isKotlinType. Hence starting of spring cloud stream module fails asKotlinFunctionWrapperis not put and theConfigurationexpects javaFunction,ConsumerorSupplier...