6

We currently have a direct Websocket connection that goes to a backend webservice from our UI Application. Now when we are trying to do the same through Zuul(ApiGateway) we are not able to connect to backend service We have gone through below issue that does not solve our problem https://github.com/spring-cloud/spring-cloud-netflix/issues/163

but it gives me an alternative in below link https://jmnarloch.wordpress.com/2015/11/11/spring-cloud-sock-js-stomp-zuul-no-websockets/ I am considering it as a last solution.

My other Question is, if we want to use websocket protocol with zuul what changes we need to perform in zuul as I am new to websocket because we know spring support websocket and Zuul is a spring based service (Correct if I am wrong)

UPDATE

This feature wont be available with zuul 2 as of my knowledge. Zuul 2 will not be incorporated into Spring Cloud. See spring cloud gateway for websockets support. check this out(https://github.com/spring-cloud/spring-cloud-netflix/issues/163)

Brijan Elwadhi
  • 420
  • 3
  • 6
  • 17
  • 1
    you can look [here](https://github.com/bilak/spring-websocket-rabbitmq-poc) I've configured websocket with zuul through stomp/sockjs protocol. Take a look mainly at gateway and websocket1 applications – bilak Sep 27 '16 at 19:33
  • Thank you for the link. I will look into it. :) – Brijan Elwadhi Sep 28 '16 at 05:53
  • You can use Spring Cloud Gateway. https://cloud.spring.io/spring-cloud-gateway/single/spring-cloud-gateway.html#_websocket_routing_filter – LEO May 27 '19 at 08:49

3 Answers3

2

Zuul 1 is unable to support websockets. Zuul 2 will support it https://github.com/Netflix/zuul/issues/112.

spencergibb
  • 24,471
  • 6
  • 69
  • 75
  • Hi @spencergibb, Thanks for your reply We have used zuul-core version:2.0.0-r.c.2 which is present in "https://mvnrepository.com/artifact/com.netflix.zuul/zuul-core" but it is not working for us and there is no release for spring-cloud-starter-zuul for zuul 2 and i am not able to get any roadmap for it and websocket is must for me. Thanks in advance – Brijan Elwadhi Sep 14 '16 at 14:11
  • 1
    We won't move to zuul 2 until it is Generally Available, not a pre-release RC2. We could start integration work soon. We have an open issue https://github.com/spring-cloud/spring-cloud-netflix/issues/163 – spencergibb Sep 14 '16 at 15:15
  • hi @spencergibb, Thanks again we will wait for zuul 2 and will try some work arounds I am facing one more problem with zuul. It is modifying my content type(multipart form-data to text/plain ) header and I am using 1.1.6.Release i know it is fix 1.1.0.M5 but I am still facing this issue – Brijan Elwadhi Sep 15 '16 at 09:14
1

We have created a zuul proxy web socket support feature to resolve this issue. I will be creating a pull request in spring cloud netflix soon. The library and demo are currently hosted in github.

mthizo247
  • 11
  • 1
0

You can use spring-cloud-starter-gateway instead of zuul. WebSocket is supported and it's a much better developer experience since it's tightly integrated with Spring.

Panduka Nandara
  • 504
  • 6
  • 14