You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I have to add a new line delimiter to every item in the Flux in the client and let server side know it should be a Flux.
Flux.just("a\n", "b\n", "c\n", "d\n")
Currently, I have not tried other interaction modes Like regular @Controller/@RequestMapping, RSocketInboundGateway should accept the following payloads.
(empty)
T
Mono<T>
Flux<T>
The following explanation is quoted from the answer from @artembilan:
Currently the server side of Spring Integration doesn't treat an incoming Flux as a stream of independent payloads. So, we try to connect all of them into a single value. The new line delimiter is an indicator that we expect independent values. Spring Messaging on its side does exactly opposite: it checks for multi-value expected type and decode every element in the incoming Flux in its map() instead of an attempt for the whole Publisher decoding.
It's going to be kinda breaking change, but possibly need to consider to fix RSocketInboundGateway logic to be consistent with regular @MessageMapping for RSocket support.
The text was updated successfully, but these errors were encountered:
hantsy
changed the title
Rsocket InboundGateway message handling should be consistent with regauler @MessageMapping
Rsocket InboundGateway message handling should be consistent with regular @Controller/@MessageMapping
Mar 3, 2020
Fixesspring-projects#3207
Previously an incoming RSocket Publisher has been decoded as a single unit
leading to extra work on the client side, e.g. a delimiter has to be provided
to treat each payload item as independent
* To have a consistency with Spring Messaging and its `PayloadMethodArgumentResolver`
change an `RSocketInboundGateway` to process inbound payloads as `Flux` and decode
each item independently.
* Change `RSocketDslTests` to remove delimiters and make it consistent with the regular
`RSocketRequester` client
Fixesspring-projects#3207
Previously an incoming RSocket Publisher has been decoded as a single unit
leading to extra work on the client side, e.g. a delimiter has to be provided
to treat each payload item as independent
* To have a consistency with Spring Messaging and its `PayloadMethodArgumentResolver`
change an `RSocketInboundGateway` to process inbound payloads as `Flux` and decode
each item independently.
* Change `RSocketDslTests` to remove delimiters and make it consistent with the regular
`RSocketRequester` client
* GH-3207: RSocket inbound: decode each flux item
Fixes#3207
Previously an incoming RSocket Publisher has been decoded as a single unit
leading to extra work on the client side, e.g. a delimiter has to be provided
to treat each payload item as independent
* To have a consistency with Spring Messaging and its `PayloadMethodArgumentResolver`
change an `RSocketInboundGateway` to process inbound payloads as `Flux` and decode
each item independently.
* Change `RSocketDslTests` to remove delimiters and make it consistent with the regular
`RSocketRequester` client
* * Add `decodeFluxAsUnit` option into `RSocketInboundGateway`
* Document the change
The original question is posted on StackOverflow, check here.
My code sample is here.
Currently, I have to add a new line delimiter to every item in the
Flux
in the client and let server side know it should be aFlux
.Currently, I have not tried other interaction modes Like regular
@Controller/@RequestMapping
, RSocketInboundGateway should accept the following payloads.The following explanation is quoted from the answer from @artembilan:
The text was updated successfully, but these errors were encountered: