# AMQP 1.0

Reads messages from an AMQP (1.0) server.

The following metadata fields are added to each message:

```
- amqp_content_type

- amqp_content_encoding

- amqp_creation_time

- All string typed message annotations
```

By setting `read_header` to `true`, additional message header properties will be added to each message:

```
- amqp_durable

- amqp_priority

- amqp_ttl

- amqp_first_acquirer

- amqp_delivery_count
```

This input benefits from receiving multiple messages in flight in parallel for improved performance. You can tune the max number of in flight messages with the field `credit`.

***

## Configuration

| Name             | Type      | Optional | Secret | Description                                                                                                                                                                                                        |
| ---------------- | --------- | -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| urls             | \[]string | no       | no     | A list of URLs to connect to. The first URL to successfully establish a connection will be used until the connection is closed. If an item of the list contains commas it will be expanded into multiple URLs.     |
| source_address   | string    | no       | no     | The source address to consume from.                                                                                                                                                                                |
| azure_renew_lock | bool      | yes      | no     | Experimental: Azure service bus specific option to renew lock if processing takes more then configured lock time. The value defaults to `false`.                                                                   |
| read_header      | bool      | yes      | no     | Read additional message header fields into `amqp_*` metadata properties. The value defaults to `false`.                                                                                                            |
| credit           | int       | yes      | no     | Specifies the maximum number of unacknowledged messages the sender can transmit. Once this limit is reached, no more messages will arrive until messages are acknowledged and settled. The value defaults to `64`. |
| tls              | tls       | no       | no     | Custom TLS settings can be used to override system defaults.                                                                                                                                                       |
| sasl             | sasl      | no       | no     | Enables SASL authentication.                                                                                                                                                                                       |

### 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 `[]`.                                                        |

### SASL

| Name      | Type   | Optional | Secret | Description                                                                                                                          |
| --------- | ------ | -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| mechanism | string | yes      | no     | The SASL authentication mechanism to use. The value defaults to `"none"`.                                                            |
| user      | string | yes      | no     | A SASL plain text username. It is recommended that you use environment variables to populate this field. The value defaults to `""`. |
| password  | string | yes      | yes    | A SASL plain text password. It is recommended that you use environment variables to populate this field. The value defaults to `""`. |
