Overview
This input type allows you to specify a NATS stream subscription for Edge Delta to monitor.
Review Sample Configuration
Review the following sample configuration:
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
Review Parameters
Review the following parameters that you can configure in the Edge Delta App.
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.
Review the following example:
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.
Review the following example:
input_mode: "normal"
consumer_mode
Optional
Mark (or enter) pull or push, based on if the consumer is push-based or pull-based.
Review the following example:
consumer_mode: "pull"
cluster_url
Required
Enter the NATS cluster endpoint.
Review the following example:
cluster_url: "nats://localhost:4222"
stream_name
Required
Enter the name of the stream where the input can obtain data from.
Review the following example:
stream_name: "example-stream"
subject
Optional
Enter the channel where the input can obtain data from.
Review the following example:
subject: "example-subject-1"
subject
Optional
Enter the channel where the input can obtain data from.
Review the following example:
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.
Review the following example:
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.
Review the following example:
ack_wait_duration: 10s
subject_prefix
Optional
Enter the prefix for the channel that this input will obtain information from.
Review the following example:
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.
Note
To use this parameter, you must also set the agent name via the 'ED_NATS_AGENT_NAME' environment variable.
To learn more, see Variables.
Review the following example:
total_agent_count: 5
total_subject_count
Optional
Enter the number of subjects to create in advance. This value should be a fixed number.
Review the following example:
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.
Review the following example:
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.
Review the following example:
disable_acks: true