# AMQP configuration

Use this page to understand the AMQP fields that control RabbitMQ connectivity for Ripple Custody. The examples show one possible configuration shape; your broker topology, hostnames, credentials, and TLS settings depend on your deployment.

This page applies to on-premise deployments only. For current defaults and the full supported schema, use the configuration packaged with your release.

## What this config controls

Ripple Custody uses AMQP for message-based communication between components. There are two AMQP configuration areas:

- **External AMQP**: Customer-managed RabbitMQ. External AMQP is **required** for event processing and can **optionally** be used for core components.
- **Internal AMQP**: RabbitMQ deployed with Ripple Custody. Internal AMQP is **enabled by default** for core components and is never used for event processing.


Core components can use either internal AMQP or external AMQP, but not both at the same time.

## Configuration fields

### External AMQP

Location: `harmonize.externalAmqp`

| Parameter | Type | Default | Description |
|  --- | --- | --- | --- |
| `enabledForCoreComponents` | bool | `false` | Route core component AMQP traffic through the external broker. Mutually exclusive with `internalAmqp.enabledForCoreComponents`. |
| `host` | string | `nil` | External AMQP host address. |
| `port` | int | `nil` | External AMQP port. Common values are `5672` or `5671` for TLS. |
| `username` | string | `nil` | Username for authentication. |
| `password` | string | `""` | Password for authentication. |
| `vhost` | string | `nil` | Virtual host name. |
| `sslEnabled` | bool | `nil` | Enable SSL/TLS connection. |
| `authType` | string | `"plain-authentication"` | Authentication type. |
| `amqpProtocolVersion` | string | `"v1"` | Protocol version. Possible values: `v1`, `v09`. |
| `topicName` | string | `nil` | Topic name for messaging. |
| `existingSecret` | string | `nil` | Reference to an existing Kubernetes secret. |


### Internal AMQP

Location: `harmonize.internalAmqp`

| Parameter | Type | Default | Description |
|  --- | --- | --- | --- |
| `enabledForCoreComponents` | bool | `true` | Enable internal AMQP for core components. Mutually exclusive with `externalAmqp.enabledForCoreComponents`. |
| `host` | string | `<chart-fullname>` | Internal RabbitMQ host. |
| `port` | int | `5672` | RabbitMQ port. |
| `username` | string | `"user"` | RabbitMQ username. |
| `vhost` | string | `"harmonize"` | RabbitMQ virtual host. |
| `sslEnabled` | bool | `true` | Enable SSL for internal RabbitMQ. |
| `amqpProtocolVersion` | string | `"v09"` | Protocol version. Internal AMQP supports `v09`. |
| `existingSecret` | string | `""` | Reference to an existing Kubernetes secret. |


## Constraints and relationships

- `harmonize.externalAmqp.enabledForCoreComponents` and `harmonize.internalAmqp.enabledForCoreComponents` are mutually exclusive.
- Event processing requires external AMQP.
- Internal AMQP is not used for event processing.
- Core components use internal AMQP unless you route them to external AMQP.
- External AMQP supports `v1` and `v09`; internal AMQP uses `v09`.


## Secret format

When you use `existingSecret` for either internal or external AMQP, the secret must contain the expected password and connection URI keys:


```yaml
apiVersion: v1
kind: Secret
metadata:
  name: amqp-credentials
type: Opaque
stringData:
  rabbitmq-password: "<password>"
  AMQP_URI: "amqp://<username>:<password>@<host>:<port>/<vhost>"
```

## Example

This example shows internal AMQP for core components and external AMQP for event processing:


```yaml
harmonize:
  internalAmqp:
    enabledForCoreComponents: true
    username: "user"
    vhost: "harmonize"
    sslEnabled: true

  externalAmqp:
    enabledForCoreComponents: false
    host: "events-rabbitmq.example.com"
    port: 5671
    username: "events"
    password: "SECURE_PASSWORD"
    vhost: "events"
    sslEnabled: true
    amqpProtocolVersion: "v1"
```

In this shape, core components communicate through internal AMQP. Event processing uses the external broker.

## Related topics

- [PostgreSQL configuration](/products/custody/v1.36/deployment/reference/postgresql)
- [Networking configuration](/products/custody/v1.36/deployment/reference/networking)
- [Message queue planning](/products/custody/v1.36/deployment/planning/messaging)