quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.84k stars 2.7k forks source link

STOMP, SockJS or similar support for Websockets #31313

Closed va575 closed 1 month ago

va575 commented 1 year ago

Description

Spring has STOMP + SockJS support for Websockets including broker support by just calling enableStompBrokerRelay() and configuring.

Is this feature or similar support going to be implemented in Quarkus too? (maybe as an extension?)

Implementation ideas

No response

geoand commented 1 year ago

We don't have anything like that on the roadmap, but would definitely be willing to see contributions

cescoffier commented 1 month ago

Using a WebSocket frame using the STOMP syntax would be possible. However, I'm more worried about the "broker" part. Implementing a broker (point-to-point, broadcast, etc.) requires a lot of complexity, so we do not have this feature at the moment. I don't know if STOMP is still very attractive or used these days. We would consider it if we had a lot of demand.

If you need a STOMP client, you can use what I proposed at https://github.com/quarkusio/quarkus/issues/12212.

We already have SockJS support with some "broker" semantics. It's based on the Quarkus event bus (point-to-point, broadcast, request-reply). The advantage of this is that the transport protocol can be negotiated on old browsers. This is documented here: https://quarkus.io/guides/vertx-reference#bidirectional-communication-with-browsers-by-using-sockjs.

I'm going to close this issue as SockJS is there. We could think about development experience improvements, but I would track them separately (ideas are welcome). About Stomp, let me know if there is a lot of demand (open an issue and vote (+1 reactions)