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

Fields

FieldTypeRequiredDescription
retry ReliabilityRetryRetry policy for failed sends.
batch BatchingBatchLogical batching hints.
connect ConnectionConnectConnection strategy for establishing outbound sockets.
url Connectionurl (string)Remote endpoint to publish to (required for client mode).
Examples: https://example.com/path
mode ConnectionModeOperating mode for this output.
Allowed values: client, server-output, server-input, relay
headers Headersmap (string)Headers to include during the WebSocket handshake.
query Headersmap (string)Query parameters appended to the connection URL.
subprotocols Headersstring[]Preferred subprotocols.
payload FramingPayloadEncoding strategy for emitted frames.
Allowed values: text, json, binary, binary-base64
auth AuthenticationAuthAuthentication material inserted into the handshake.
tls SecurityTlsTLS configuration used when acting as a client.
heartbeat HealthHeartbeatOptional heartbeat configuration for outgoing connections.
reconnect ReliabilityReconnectReconnection policy for client mode.
server Server OutputServerEmbedded server configuration when exposing a WebSocket endpoint.
cursor CursorsCursorCursor configuration for resume tokens.

Reliability

Show fields
FieldTypeRequiredDescription
retryRetryRetry policy for failed sends.
reconnectReconnectReconnection policy for client mode.

Batching

Show fields
FieldTypeRequiredDescription
batchBatchLogical batching hints.

Connection

Show fields
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

Headers

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

Framing

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

Authentication

Show fields
FieldTypeRequiredDescription
authAuthAuthentication material inserted into the handshake.

Security

Show fields
FieldTypeRequiredDescription
tlsTlsTLS configuration used when acting as a client.

Health

Show fields
FieldTypeRequiredDescription
heartbeatHeartbeatOptional heartbeat configuration for outgoing connections.

Server Output

Show fields
FieldTypeRequiredDescription
serverServerEmbedded server configuration when exposing a WebSocket endpoint.

Cursors

Show fields
FieldTypeRequiredDescription
cursorCursorCursor configuration for resume tokens.

Schema

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

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).
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).
wrap-as-jsonboolean (bool)Format the output batch as a JSON array.

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.

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.

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).

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.

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.

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

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.
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.

Headers Table

HeaderValue
Header-Namevalue

Value format: templated-text.

Query Table

ParameterValue
paramvalue

Value format: templated-text.

Auth - Headers Table

HeaderValue
Header-Namevalue

Value format: templated-text.

Auth - Query Table

ParameterValue
paramvalue

Value format: templated-text.

Batch - Mode Options

ValueDescription
fixedFixed
documentDocument

Connect - Mode Options

ValueDescription
lazyDefer connection until the first event needs to be sent.
eagerEstablish the connection during initialisation and keep it open.

Mode Options

ValueDescription
clientClient
server-outputServer Output
server-inputServer Input
relayRelay

Payload Options

ValueDescription
textText
jsonJson
binaryBinary
binary-base64Binary Base64

Heartbeat - Action Options

ValueDescription
reconnectReconnect
log-onlyLog Only