Open chethankpc opened 3 years ago
Hello chethankpc!
I have the same issue... Did you manage to solve the problem?
I solved using spring-cloud-gateway only, I tweaked my architecture. Now spring cloud gateway is the front service , I have configured the routers based on the urls and protocol
Yes spring-cloud-gateway is more robust. However I don't have enough time to do that rework.
OK thank you for your response.
Hello chethankpc!
I'm also tweaking my architecture with spring cloud gateway and everything is working fine except for websockets. Do you have any sample (java code or application.yml) to setup the forwarding of websocket connections? Or in other words, how to configure the routes to make spring cloud gateway acting as a reverse proxy for websockets ?
Thank you in advance for your response.
OK I think my issue is not in understanding how spring cloud gateway works but rather why my route predicate is not matched.
Thanks anyway.
I am using this web-proxy code to have reverse websocket proxy using spring-boot, it works during initial connection after that I get this below error
I am using this web-proxy code to have reverse websocket proxy using spring-boot, it works during initial connection after that I get this below error
` java.lang.illegalstateexception: the remote endpoint was in state [text_partial_writing] which is an invalid state for called method at
I added synchronized block here for sendMessage but still getting the same error at this line
Is there a other java websocket proxy code ?
I tried to use spring-cloud-gateway but it is not compatible with spring-starter-web(i can not remove web due to spring MVC dependency in the code)
I added synchronized block sendMessage but still getting the same error at https://github.com/barrett-rob/java-websocket-reverse-proxy/blob/master/src/main/java/com/jwrp/javawebsocketreverseproxy/NextHop.java#L65