helidon
helidon copied to clipboard
Helidon integration with Tyrus Client would help users develop services backed by other WebSockets
Helidon integration with Tyrus enables proper support for WebSocket server endpoints. Similarly, it would be helpful, if there is support to connect to other websocket endpoints, and consume data obtained from those.
An use-case could be like Helidon endpoint, which streams / filters / aggregates data obtained from another web-socket endpoint.
Environment Details
- Helidon Version: 2.5.1
- Helidon MP
- JDK version: JDK 17
- OS: Windows 11
What sort of support are you looking for? You can use the WebSocket client API as is now. Please elaborate.
I tried to implement JAX-RS Web API connect to a WebSocket Client using javax.websocket-api / jakarta.websocket-api client endpoints with custom encoders / decoders for data and consume data from the same. But, i ran into blockers as i could not get even a basic example working past ClientManager.createClient() / client.connectToServer() call successfully.
If this support is already available in Helidon, then it would be nice to provide a sample / example code to educate us on how to get it working.
@bvkrish83 I don't understand your first sentence: JAX-RS and WebSocket are different APIs/protocols. There are several examples/tests that use the WebSocket client API in our code base (also this is a standard API that is well documented, not specific to Helidon). For example,
https://github.com/oracle/helidon/blob/helidon-2.x/webserver/tyrus/src/test/java/io/helidon/webserver/tyrus/EchoClient.java
Also when you say "ran into blockers", there's just not enough information there to provide additional help.
@spericas I wanted to develop a JAX-RS API, which when executed in turn would connect to WebSocket to download / process some messages from server, and then return a response based on this processing step.
I will try to look into the sample code / classes shared by you, and then either close this issue (if it addresses all my concerns) or provide additional details / questions, if i have any - probably in couple of days time.
@bvkrish83 Let me know if I can close this issue
@bvkrish83 Please re-open if necessary