spring-cloud-function
spring-cloud-function copied to clipboard
Consumer (Reactive) add Mono support
add Consumer (Reactive) Each message generates a Mono. When an error occurs in a single message, it can also be processed and entered into dlq correctly
public Function<Mono<?>, Mono<Void>>consumer() {
return mono -> mono.map(..).filter(..).then();
}
I'm not a part of the team so I may be wrong, but from what I've understood I'd recommend not to use Reactive Spring Cloud Stream until the Reactor Kafka (or any other reactive source) will be released. I'd recommend in general to make sure that your source is reactive/async when you using Reactor. See this issue to track Reactor Kafka support in Spring Cloud Stream. https://github.com/spring-cloud/spring-cloud-stream/issues/2293
I do agree with @devlap2 . While we provide support for reactive API, it is just that - the API support, but no back pressure or other features that specifically ask for reactive support and as @devlap2 pointed out it is because our sources and targets are not reactive themselves. In other words behind the scene it is still a conventional MessageListener sending messages to a stream
That said, i don't mind adding such support, although I believe it will be transferred to s-c-function. Let me see and I'll transfer it.