Datasource: HTTP Event Stream
Use HTTP Event Stream for long-lived HTTP connections that continuously produce events.
This datasource automatically handles reconnect logic and message decoding for JSON, XML, and plain text streams.
Best Use Cases
- Camera alert streams
- Continuous event feeds from gateways
- Real-time external system notifications over persistent HTTP
Configuration Fields
| Field | Required | Type | Default | Purpose |
|---|---|---|---|---|
url | Yes | string | - | Stream endpoint URL |
authType | No | select | none | Auth mode: none, basic, digest, token |
username | Conditional | string | - | Required when auth is basic or digest |
password | Conditional | password | - | Required when auth is basic or digest |
token | Conditional | string | - | Required when auth is token |
timeout | No | number | 30 | Connection timeout (seconds) |
reconnectDelay | No | number | 5 | Initial reconnect delay (seconds) |
maxReconnectDelay | No | number | 60 | Reconnect backoff ceiling (seconds) |
encoding | No | string | utf-8 | Stream text encoding |
maxBufferSize | No | number | 10000 | Maximum buffered lines |
keepRawMessage | No | boolean | false | Include unparsed raw line payload |
How to Configure Correctly
- Select HTTP Event Stream datasource type.
- Set
urlto the stream endpoint. - Choose
authTypeand complete dependent fields. - Set
timeoutand reconnect values for network stability. - Use
keepRawMessage=trueonly when debugging parsing behavior. - Connect datasource to workflow and validate stream events.
Example Config (Digest Auth)
{
"url": "http://camera-ip/ISAPI/Event/notification/alertStream",
"authType": "digest",
"username": "admin",
"password": "<secret>",
"timeout": 30,
"reconnectDelay": 5,
"maxReconnectDelay": 60,
"encoding": "utf-8",
"maxBufferSize": 10000,
"keepRawMessage": false
}
Reliability Notes
- Prefer exponential reconnect windows to avoid connection storms.
- Keep buffer size aligned with expected event volume.
- Validate event schema before heavy downstream processing.
Common Problems
- Frequent reconnects: unstable network or timeout too low
- Auth failures: wrong auth mode or invalid credentials
- Parsing issues: mismatched encoding or malformed stream lines
Related Pages
- Continue with Datasource - Webhook for push-style HTTP integration.
- Continue with Workflows for validation and fallback branch design.
