-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GH-3183: Add ReactiveRequestHandlerAdvice #3197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If the solution is good, I'll go ahead with WebFlux reworking. This feature opens for us a possible to apply a I may admit that this could be kinda breaking change though since that modified |
HI @artembilan, This will add a lot of value. As it gives a lot of scope for customization and unleashes the power of Reactive framework. |
LGTM |
I'll come back to this after merging #3201 . |
I have changed my mind: now |
Fixes spring-projects#3183 * Introduce a `ReactiveRequestHandlerAdvice` with a `BiFunction<Message<?>, Mono<?>, Publisher<?>>` logic to apply a `Mono.transform()` operator for a returned from the handler `Mono` reply * Fix `WebFluxRequestExecutingMessageHandler` to return a `Mono.then()` instead of an explicit subscription - it happens downstream anyway during reply producing with a proper error handling, too * Demonstrate `ReactiveRequestHandlerAdvice` in the `RSocketDslTests` - without `retry()` it fails * Add `ConsumerEndpointSpec.customizeMonoReply()` for convenience * Document `ReactiveRequestHandlerAdvice` feature
Fixes #3183
ReactiveRequestHandlerAdvice
with aBiFunction<Message<?>, Mono<?>, Publisher<?>>
logic to apply a
Mono.transform()
operator for a returned from the handlerMono
replyWebFluxRequestExecutingMessageHandler
to return aMono.then()
instead of an explicit subscription -it happens downstream anyway during reply producing with a proper error handling, too
ReactiveRequestHandlerAdvice
in theRSocketDslTests
- withoutretry()
it failsConsumerEndpointSpec.customizeMonoReply()
for convenienceReactiveRequestHandlerAdvice
feature