Special handle for void in the RSocketOutGateway
To avoid extra `Publisher` subscription work in the target application "flatten" a returned empty `Flux` for the `void` expected type into a `Mono.empty()` for automatic subscription on the output channel
This commit is contained in:
committed by
Gary Russell
parent
c38da2f4ee
commit
fa1ab223ae
@@ -188,6 +188,9 @@ public Flux<?> flattenRSocketResponse(Flux<?> payload) {
|
||||
|
||||
Or subscribed explicitly in the target application logic.
|
||||
|
||||
The expected response type can also be configured (or evaluated via expression) to `void` treating this gateway as an outbound channel adapter.
|
||||
However the `outputChannel` still has to be configured (even if it just a `NullChannel`) to initiate a subscription to the returned `Mono`.
|
||||
|
||||
See <<rsocket-java-config>> for samples how to configure an `RSocketOutboundGateway` endpoint a deal with payloads downstream.
|
||||
|
||||
[[rsocket-namespace]]
|
||||
|
||||
Reference in New Issue
Block a user