Edge Delta NATS JetStream Input

NATS stream subscription for Edge Delta to monitor.

Overview

This input type allows you to specify a NATS stream subscription for Edge Delta to monitor.


Example

  nats:
    - labels: "my-nats-normal"
      input_mode: "normal"
      consumer_mode: "pull"
      cluster_url: "nats://localhost:4222"
      stream_name: "example-stream"
      subject: "example-subject-1"
      timeout: 1m
      ack_wait_duration: 10s
    - labels: "my-nats-distributed"
      input_mode: "distributed"
      consumer_mode: "push"
      cluster_url: "nats://localhost:4222"
      stream_name: "example-stream"
      subject_prefix: "example-subject"
      total_agent_count: 5
      total_subject_count: 10
      should_split_lines: true
      timeout: 1m
      disable_acks: true

Parameters

labels

Required

Enter a descriptive name for this input.

When you create a workflow, you will use this label to enter your input into the workflow.

labels: "my-nats-normal"

input_mode

Optional

Enter normal or distributed based on your sources.

If you only need to specify one source, then enter normal for non-complex configurations.

If you need to specify multiple sources, then enter distributed.

input_mode: "normal"

consumer_mode

Optional

Mark (or enter) pull or push, based on if the consumer is push-based or pull-based.

consumer_mode: "pull"

cluster_url

Required

Enter the NATS cluster endpoint.

cluster_url: "nats://localhost:4222"

stream_name

Required

Enter the name of the stream where the input can obtain data from.

stream_name: "example-stream"

subject

Optional

Enter the channel where the input can obtain data from.

subject: "example-subject-1"

subject

Optional

Enter the channel where the input can obtain data from.

subject: "example-subject-1"

timeout

Optional

Enter a length of time when the request will be “timed out” in the NATS cluster.

The default value is 10s.

timeout: 1m

ack_wait_durations

Optional

Enter a length of time that a delivered message can remain unacknowledged before a redelivery is attempted.

The default value is 5s.

ack_wait_duration: 10s

subject_prefix

Optional

Enter the prefix for the channel that this input will obtain information from.

subject_prefix: "example-subject"

total_agent_count

Optional

Enter the number of agents that should listen to the specified stream. This number will be used to calculate which subjects the input will listen from.

To use this parameter, you must also set the agent name via the ‘ED_NATS_AGENT_NAME’ environment variable.

To learn more, see Variables.

total_agent_count: 5

total_subject_count

Optional

Enter the number of subjects to create in advance. This value should be a fixed number.

total_subject_count: 10

should_split_lines

Optional

Enter true or false to split the obtained payload into separate lines, based on the newline character.

should_split_lines: true

disable_acks

Optional

Enter true or false to ignore (not acknowledge) any message after the message is consumed.

Enter true to ignore messages.

Enter false to acknowledge messages.

The default value is false.

disable_acks: true