If I use a reactive client, should the server be reactive too?

China☆狼群 提交于 2021-01-01 08:50:22

问题


I want to use a reactive client (Reactive WebSocketClient i.e ReactorNettyWebSocketClient) to talk to a server which I don't know if it is reactive or not. Does it make sense to use a reactive client to talk to a server which is not reactive?

I tried to connect to a server probably not reactive, and I got this error:

io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Invalid handshake response getStatus: 999 Unknown
    at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(WebSocketClientHandshaker13.java:264)
    at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker.finishHandshake(WebSocketClientHandshaker.java:303)
    at reactor.netty.http.client.WebsocketClientOperations.onInboundNext(WebsocketClientOperations.java:113)
    at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:91)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)

But I am not sure if this is because of reactive client trying to talk to a non-reactive or a different problem.

来源:https://stackoverflow.com/questions/57686462/if-i-use-a-reactive-client-should-the-server-be-reactive-too

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!