# NSQ

Subscribe to an NSQ instance topic and channel.

The following metadata fields are added to each message:

* nsq_attempts
* nsq_id
* nsq_nsqd_address
* nsq_timestamp

***

## Configuration

| Name                   | Type      | Optional | Secret | Description                                                                                       |
| ---------------------- | --------- | -------- | ------ | ------------------------------------------------------------------------------------------------- |
| nsqd_tcp_addresses     | \[]string | no       | no     | A list of nsqd addresses to connect to.                                                           |
| lookupd_http_addresses | \[]string | no       | no     | A list of nsqlookupd addresses to connect to.                                                     |
| tls                    | tls       | no       | no     | Custom TLS settings can be used to override system defaults.                                      |
| topic                  | string    | no       | no     | The topic to consume from.                                                                        |
| channel                | string    | no       | no     | The channel to consume from.                                                                      |
| user_agent             | string    | no       | no     | A user agent to assume when connecting.                                                           |
| max_in_flight          | int       | yes      | no     | The maximum number of pending messages to consume at any given time. The value defaults to `100`. |
| max_attempts           | int       | yes      | no     | The maximum number of attempts to successfully consume a messages. The value defaults to `5`.     |

### TLS configuration

| Name                 | Type            | Optional | Secret | Description                                                                                                                |
| -------------------- | --------------- | -------- | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| enabled              | bool            | yes      | no     | Whether custom TLS settings are enabled. The value defaults to `false`.                                                    |
| skip_cert_verify     | bool            | yes      | no     | Whether to skip server side certificate verification. The value defaults to `false`.                                       |
| enable_renegotiation | bool            | yes      | no     | Whether to allow the remote server to repeatedly request renegotiation.                                                    |
|                      |                 |          |        | Enable this option if you're seeing the error message `local error: tls: no renegotiation`. The value defaults to `false`. |
| root_cas             | string          | yes      | yes    | An optional root certificate authority to use.                                                                             |
|                      |                 |          |        | This is a string, representing a certificate chain from the parent trusted root certificate,                               |
|                      |                 |          |        | to possible intermediate signing certificates, to the host certificate. The value defaults to `""`.                        |
| client_certs         | \[]client_certs | yes      | no     | A list of client certificates to use. . The value defaults to `[]`.                                                        |
