_Docs/
Get StartedModulesPlatformDeployCookbookChangelogReference
_Deploy
  • Deployment Overview
    • Overview
    • Requirements
    • Demo
      • All-in-one Demo Chart
    • Installation
      • Operator Setup
      • Control Plane SetupEE
    • Infrastructure Services
      • PostgreSQL
      • Message Broker
      • Temporal
    • Module Configuration
      • Stack Configuration
      • Gateway Module
      • Ledger Module
      • Payments Module
      • Auth ModuleEE
      • Orchestration ModuleEE
      • Reconciliation ModuleEE
      • Wallets ModuleEE
      • Webhooks ModuleEE
    • Configuration Reference
      • Operator settings reference
      • API Reference
    • Backups management
    • Troubleshooting
    • Configure OpenTelemetry
    • Traces
    • Metrics
    • Upgrade from the operator
    • Database update
  1. Deploy
  2. Self-Hosted
  3. Infrastructure Services
  4. Message Broker
Deploy

Message Broker

This page requires self-hosted edition.
Deployment

The broker is the messaging system that the Formance stack uses to communicate between its modules. The Formance stack supports both NATS and Kafka as brokers.

The broker sends messages between the different modules of the Formance stack. The producers are Ledger, Gateway, and Payments. The consumers are Benthos, Orchestration and Webhooks.

This stream is created following the format: {stackName}-{module}

Option 1: NATS#

Version 2.6 or higher with Jetstream is required.

The recommended way to spin up a NATS deployment is through the official NATS helm chart.

Depending on your setup, you may need to activate Jetsream mode on your NATS deployment manually. Jetstream is required for the resources deployed by the Formance Operator to function properly.

Create the NATS settings#

In this example, you'll set up a configuration for the Broker of the formance-dev stack. This configuration will apply to all the modules of this stack.

YAML
apiVersion: formance.com/v1beta1
kind: Settings
metadata:
  name: formance-dev-nats
spec:
  key: broker.dsn
  stacks:
    - 'formance-dev'
  value: nats://nats.formance-system.svc:4222?replicas=3

Option 2: Kafka#

The Formance stack also supports Kafka as a broker. To use Kafka, you need to set up a Kafka cluster and configure the Formance Operator to use it.

Create the Kafka settings#

In this example, you'll set up a configuration for the Broker of the formance-dev stack. This configuration will apply to all the modules of this stack.

YAML
apiVersion: formance.com/v1beta1
kind: Settings
metadata:
  name: formance-dev-nats
spec:
  key: broker.dsn
  stacks:
    - 'formance-dev'
  value: kafka://kafka.formance-system.svc:9092
PostgreSQLTemporal
On This Page
  • Option 1: NATS
  • Create the NATS settings
  • Option 2: Kafka
  • Create the Kafka settings