# NATS JetStream

Reads messages from NATS JetStream subjects.

## Configuration

| Name            | Type      | Optional | Secret | Description                                                                                                                                                                           |
| --------------- | --------- | -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| urls            | \[]string | no       | no     | A list of URLs to connect to. If an item of the list contains commas it will be expanded into multiple URLs.                                                                          |
| queue           | string    | yes      | no     | An optional queue group to consume as. Used to configure a push consumer.                                                                                                             |
| subject         | string    | no       | no     | A subject to consume from. Supports wildcards for consuming multiple subjects. Either a subject or stream must be specified.                                                          |
| durable         | string    | yes      | no     | Preserve the state of your consumer under a durable name. Used to configure a pull consumer.                                                                                          |
| stream          | string    | yes      | no     | A stream to consume from. Either a subject or stream must be specified.                                                                                                               |
| bind            | bool      | yes      | no     | Indicates that the subscription should use an existing consumer. The value defaults to `false`.                                                                                       |
| deliver         | string    | yes      | no     | Determines which messages to deliver when consuming without a durable subscriber. The value should be one of `all`, `last`, `last_per_subject` or `new`. The value defaults to `all`. |
| ack_wait        | string    | yes      | no     | The maximum amount of time NATS server should wait for an ack from consumer. The value defaults to `30s`.                                                                             |
| max_ack_pending | int       | yes      | no     | The maximum number of outstanding acks to be allowed before consuming is halted. The value defaults to `1024`.                                                                        |
| auth            | auth      | yes      | no     | Optional configuration of NATS authentication parameters.                                                                                                                             |

### Auth

| Name           | Type   | Optional | Secret | Description                                                                          |
| -------------- | ------ | -------- | ------ | ------------------------------------------------------------------------------------ |
| user_jwt       | string | yes      | no     | An optional plain text user JWT (given along with the corresponding user NKey Seed). |
| user_nkey_seed | string | yes      | no     | An optional plain text user NKey Seed (given along with the corresponding user JWT). |
