Can we add the support to decide the interceptor to be added at run time for requester/responder during @ConnectMapping.?
Comment From: rstoyanchev
By the time the request is in @ConnectMapping
, it has passed through the RSocketInterceptor
chain, reached Spring's messaging RSocket
and is being handled within. It is too far down the processing and at that point it is too late. Why not install an RSocketInterceptor
which is essentially a proxy and then decide whether to interceptor or just make it a pass-through?
Comment From: kitkars
Thanks @rstoyanchev for responding.
We can add interceptors for requester and responder via interceptor registry which I saw. It is a great feature. But is there any way to connect both? That is, can we create a proxy for responder based on requester & metadata info. ?
or can we have a BiFunction here which provides both requester and responder rSocket instances which I believe could solve the problem?
interceptorRegistry.forResponder(rSocket -> create proxy);
Please feel free to close this issue if it does not make any sense!
Thank you so much for all your contribution. I love RSocket.
Comment From: rstoyanchev
I believe that would be a SocketAcceptorInterceptor
. In any case this is more of an RSocket Java question I think.