Skip to main content
Developers can write events to an outgoing SSE stream from a Lens by connecting an SSE Writer data connector to the output data stream of a Lens. The SSE Writer writes events to an outgoing Server-Sent Events (SSE) stream that can be consumed by any HTTP client that supports event streams, making it ideal for web dashboards, monitoring applications, and real-time analytics. Like all data stream connectors, the SSE writer can be identified and configured via the following stream type and stream config:
stream_type: sse_writer
stream_config:
  {}
As the stream_config is empty, it can be skipped. This can be passed to Newton as an event:
event:
  type: output_stream.set
  event_data:
    stream_type: server_sent_events_writer