-
Notifications
You must be signed in to change notification settings - Fork 354
Description
I have a simple setup between two services that I've built from provided examples. I have one service that listens for incoming connections:
TcpServerTransport tcp = TcpServerTransport.create(configProps.getPort());
RSocketFactory.receive()
.acceptor(itemSocketAcceptor)
.transport(tcp)
.start().log()
.subscribe();
Another service attempts to make a connection:
this.socket = RSocketFactory
.connect()
.transport(TcpClientTransport.create(<host>, <port>)
.start()
.block();
If I redeploy the receiving service, the client service never reports an error (unless I set a timeout on the requestResponse method). I can't seem to find a way for the client side to detect that the underlying connection has closed and to automatically try to reconnect. To boot, these are web applications in Spring Boot, so I'm never able to attempt to call block() during a web request.
The onClose method seems to be an indicator that the connection has closed, but I'm not sure how to use that in the context of a web request to be able to attempt to rebuild the connection which necessarily requires me to call block.
Not sure if this is an actual issue or if I've simply overlooked some documentation or examples. I'm anxious to adopt rsocket in my company, so any direction would be greatly appreciated.