I am trying to use Rsocket with websocket in one of my POC projects. In my case user login is not required. I would like to send a message only to certain clients when I rec
I didn't yet personally use RSocket with WebSocket transport, but as stated in RSocket specification underlying transport protocol shouldn't even be important.
One RSocket component is at the same time server and a client. So when browsers connect to your RSocket "server" you can inject the RSocketRequester
instance which you can then use to send messages to the "client".
You can then add these instances in your local cache (e.g. put them in some globally available ConcurrentHashMap
with key of your choosing - something from which you'll know/be able to calculate to which clients should the message from Service B be propagated).
Then in the code where you receive message from Service B just fetch all RSocketRequester
instances from the local cache which match your criteria and send them the message.