WebSocket endpoint
Publishes processed events to web clients via WebSocket transport, ideal for real-time dashboards and applications
Overview
The WebSocket Publisher Transport enables real-time event streaming to web clients, ideal for dashboards and interactive applications. Processed events are published as Json to subscribing client processes.
The example WebSocket client provided connects to a local WebSocket server (ws://localhost:7070/joule/ws/stream/quotes
) and logs incoming event data to the browser console, allowing users to verify the streaming functionality.
Client library: io.javalin:javalin:5.6.3
Examples & DSL attributes
This simple example leverages the default setting resulting in events published as StreamEvent
JSON object to connected clients.
Example client
This HTML page acts as a WebSocket client to test data streaming from a Joule server.
Open it in Chrome, go to Developer Tools > Console, and click Start Streaming
to view live event data streamed from ws://localhost:7070/joule/ws/stream/quotes
.
Attributes schema
topic
User defined topic this stream relates too
String
Last updated