quarkusio / quarkus

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

Vert.x SockJS extension #13192

Open cescoffier opened 4 years ago

cescoffier commented 4 years ago

Describe the extension

This extension would enable and configure the Vert.x SockJS bridge. This bridge allows bi-directional interaction between a web app (in-browser) and an application (using the Vert.x event bus).

Configuration suggestion

quarkus.sockjs.bridge.enabled=true|false
quarkus.sockjs.inbound=list of inbound addresses
quarkus.sockjs.outbound=list of outbound addresses

Additional context

It would also be possible to serve the event bus JavaScript client (the client-side of the bridge) and its dependencies from the extension classpath.

Interested in this extension, please +1 via the emoji/reaction feature of GitHub (top right).

cescoffier commented 4 years ago

@tsegismont - did I forget anything?

tsegismont commented 4 years ago

@cescoffier There should be a parameter for the mount point of the bridge. Something like:

quarkus.sockjs.bridge.path=/my/custom/path (may default to /eventbus)

The inbound and outbound params can be a list of strings or regular expressions.

Then in the implementation we should think about how to integrate with the Quarkus authentication system.

For all these reasons, I believe it's interesting to have integration code for the bridge in extensions, rather than leaving the effort of integration to the users (sure they can inject the router and do it themselves but that does not sound like the regular Quarkus experience).

I'm not sure there is a need for a separate extension though. This could be added to the vertx-web one.

tsegismont commented 3 years ago

See also https://github.com/quarkusio/quarkus/issues/5403