Skip to content

WebSocket

WebSocket (web-socket)

Send events to remote WebSocket peers or expose an embedded server.

Messaging json

Minimal example

output:
web-socket: {}
JSON
{
"output": {
"web-socket": {}
}
}

Contents

Authentication

Authentication
FieldTypeRequiredDescription
authAuthAuthentication material inserted into the handshake.

Batching

Batching
FieldTypeRequiredDescription
batchBatchLogical batching hints.

Connection

Connection
FieldTypeRequiredDescription
connectConnectConnection strategy for establishing outbound sockets.
urlurl (string)Remote endpoint to publish to (required for client mode).
Examples: https://example.com/path
modeModeOperating mode for this output.
Allowed values: client, server-output, server-input, relay

Cursors

Cursors
FieldTypeRequiredDescription
cursorCursorCursor configuration for resume tokens.

Framing

Framing
FieldTypeRequiredDescription
payloadPayloadEncoding strategy for emitted frames.
Default: text
Allowed values: text, json, binary, binary-base64

Headers

Headers
FieldTypeRequiredDescription
headersmap (string)Headers to include during the WebSocket handshake.
querymap (string)Query parameters appended to the connection URL.
subprotocolsstring[]Preferred subprotocols.

Health

Health
FieldTypeRequiredDescription
heartbeatHeartbeatOptional heartbeat configuration for outgoing connections.

Reliability

Reliability
FieldTypeRequiredDescription
retryRetryRetry policy for failed sends.
reconnectReconnectReconnection policy for client mode.

Security

Security
FieldTypeRequiredDescription
tlsTlsTLS configuration used when acting as a client.

Server Output

Server Output
FieldTypeRequiredDescription
serverServerEmbedded server configuration when exposing a WebSocket endpoint.

Schema

Auth - Basic Fields

FieldTypeRequiredDescription
usernamestringUsername credential (supports templating).
passwordstringPassword credential (supports templating).

Auth Fields

FieldTypeRequiredDescription
headersmap (string)Static or templated headers added during the handshake.
querymap (string)Query parameters added to the connection URL.
bearer-tokenstringBearer token inserted as Authorization: Bearer ....
basicBasicBasic auth credentials sent via header.

Batch Fields

FieldTypeRequiredDescription
fixed-sizenumber (integer)maximum number of events in an output batch.
Examples: 42, 1.2e-10
modeModeIf ‘document’ send on end of document generated by input. If ‘fixed’, use fixed_size.
Allowed values: fixed, document
timeouttime-interval (string)interval after which the batch is sent, to keep throughput going (default 100ms).
Default: 100ms
Examples: 500ms, 2h
headermultiline-text (string)put a header line before the batch.
footermultiline-text (string)put a header line after the last line of the batch.
use-document-markerboolean (bool)Enrich the job metadata with a document marker (for document handling in batch mode).
Default: false
wrap-as-jsonboolean (bool)Format the output batch as a JSON array.
Default: false

Connect Fields

FieldTypeRequiredDescription
modeModeSpecifies whether to connect eagerly during startup or lazily on demand.
Allowed values: lazy, eager
eager-timeoutstringOptional timeout to wait for an eager connection before failing start-up.

Cursor Fields

FieldTypeRequiredDescription
header-namestringHeader name used to propagate the cursor on reconnect (e.g. Last-Event-ID).
query-parameterstringQuery parameter name used to propagate the cursor value.
persist-tostringStorage location for cursor state (defaults to job-scoped state).
initial-valuestringInitial cursor value to send on the first connection.
state-idstringOptional explicit state identifier when sharing cursors across jobs.
resume-on-reconnectboolean (bool)Whether to inject the cursor on every reconnect attempt.
Default: false
value-fieldfield (string)Event field used to derive the cursor value after successful delivery.
Examples: data_field
value-pointerjson-pointer (string)JSON pointer used to derive the cursor value from emitted payloads.

Heartbeat Fields

FieldTypeRequiredDescription
ping-intervalstringInterval between ping frames.
timeoutstringGrace period for receiving a pong before the connection is considered unhealthy.
actionActionWhat to do when a heartbeat misses the timeout.
Allowed values: reconnect, log-only
payloadstringOptional ping payload to send with heartbeats.

Retry Fields

FieldTypeRequiredDescription
timeouttime-interval (string)timeout (e.g. 500ms, 2s etc. - default is 30).
Examples: 500ms, 2h
retriesnumber (integer)number of retries.
Examples: 42, 1.2e-10

Reconnect Fields

FieldTypeRequiredDescription
initial-backoffstringBackoff applied after the first failure (human-friendly duration).
max-backoffstringMaximum backoff duration before clamping (human-friendly duration).
multipliernumber (integer)Exponential multiplier applied after each failure.
Examples: 42, 1.2e-10
jitternumber (integer)Random jitter factor applied to backoff windows (0.0-1.0).
Examples: 42, 1.2e-10
max-attemptsnumber (integer)Maximum number of consecutive attempts before giving up (None=infinite).
Examples: 42, 1.2e-10
reset-afterstringTime after a successful connection before resetting the attempt counter.

Tls Fields

FieldTypeRequiredDescription
ca-certificatestringCustom CA certificate to trust.
client-certificatestringClient certificate for mutual TLS.
client-keystringClient private key for mutual TLS.
insecure-skip-verifyboolean (bool)Skip certificate validation (unsafe).
Default: false

Server - Tls Fields

FieldTypeRequiredDescription
certpath (string)Path to the certificate file.
Examples: /path/to/file, c:\users\joe\data\file.txt
keypath (string)Path to the private key file.
Examples: /path/to/file, c:\users\joe\data\file.txt

Server Fields

FieldTypeRequiredDescription
bindstringAddress to bind (e.g. 0.0.0.0:8080).
pathstringOptional path/route restriction.
tlsTlsOptional TLS material for the listener.
max-connectionsnumber (integer)Maximum simultaneously connected clients (None = unlimited).
Examples: 42, 1.2e-10
idle-timeoutstringDisconnect clients after this idle duration.
allowed-originsstring[]Restrict accepted requests to these Origin / Sec-WebSocket-Origin values.
send-buffer-capacitynumber (integer)Per-connection send buffer (messages queued when clients are slow).
Examples: 42, 1.2e-10

Auth - Headers Table

HeaderValue
Header-Namevalue

Value format: templated-text.

Auth - Query Table

ParameterValue
paramvalue

Value format: templated-text.

Headers Table

HeaderValue
Header-Namevalue

Value format: templated-text.

Query Table

ParameterValue
paramvalue

Value format: templated-text.

Batch - Mode Options

ValueNameDescription
fixedfixedFixed
documentdocumentDocument

Connect - Mode Options

ValueNameDescription
lazylazyDefer connection until the first event needs to be sent.
eagereagerEstablish the connection during initialisation and keep it open.

Mode Options

ValueNameDescription
clientclientClient
server-outputserver-outputServer Output
server-inputserver-inputServer Input
relayrelayRelay

Payload Options

ValueNameDescription
texttextText
jsonjsonJson
binarybinaryBinary
binary-base64binary-base64Binary Base64

Heartbeat - Action Options

ValueNameDescription
reconnectreconnectReconnect
log-onlylog-onlyLog Only