Skip to main content

SSE

HTTP SSE source sends a request to a given URL and listens to the response stream.

SSE Source Syntax

CREATE SOURCE <name> WITH (type="sse-server", receiver.url="<STRING>", worker.count="<INT>", headers="<STRING>");

SSE Source Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
receiver.urlThe SSE endpoint URL that should be monitored.STRINGNoNo
worker.countThe number of active worker threads to serve the incoming events.1INTYesNo
headersHTTP request headers in format.STRINGYesNo

SSE Source Example

CREATE SOURCE  ListenStream WITH (type='sse', map.type="json", receiver.url='http://localhost:8020/testsse') (param1 string);

This query shows how to subscribe to an SSE server.