It's better to addopt unifed annotation contract for both server and client side. And I think the RSocket Interface annotation is more powerful and meaningful
Comment From: rstoyanchev
We can enhance Annotated Responders to support @RSocketExchange
instead of @MessageMapping
, which would allow using the same interface to make and to handle requests.
The semantics overlap to a large degree. These are the differences I see:
- Metadata Object, followed by
MimeType
-- supported for@RSocketExchange
but not for@MessageMapping
; we can add arguments resolvers to support it RSocketRequester
argument -- this is a responder-only concept, and therefore not applicable with@RSocketExchange
- Synchronous return type -- for
@MessageMapping
we assume non-blocking handling (no I/O essentially), while for requests with@RSocketExchange
it is a way to block for the result; we can proactively switch threads when such methods are used for handling with@RSocketExchange
Comment From: CoderYellow
yes, something like MVC annotation, it's better have rescoket team to make a common standard like JAX-RS annotation, so that other framework can implement it too
Comment From: OlgaMaciaszek
We are going to experiment with this for 6.1
.
Comment From: rstoyanchev
Superseded by #30936.