nats_stream

Publish to a NATS Stream subject.

# Config fields, showing default values
output:
nats_stream:
urls:
- nats://127.0.0.1:4222
cluster_id: test-cluster
subject: benthos_messages
client_id: benthos_client
max_in_flight: 1

Performance

This output benefits from sending multiple messages in flight in parallel for improved performance. You can tune the max number of in flight messages with the field max_in_flight.

Fields

urls

A list of URLs to connect to. If an item of the list contains commas it will be expanded into multiple URLs.

Type: array
Default: ["nats://127.0.0.1:4222"]

cluster_id

The cluster ID to publish to.

Type: string
Default: "test-cluster"

subject

The subject to publish to.

Type: string
Default: "benthos_messages"

client_id

The client ID to connect with.

Type: string
Default: "benthos_client"

max_in_flight

The maximum number of messages to have in flight at a given time. Increase this to improve throughput.

Type: number
Default: 1