Maximum open connections to the Onboarding PostgreSQL database.
Go default (unlimited)
DB_ONBOARDING_MAX_IDLE_CONNS
Maximum idle connections kept alive for the Onboarding database.
Go default (2)
DB_TRANSACTION_MAX_OPEN_CONNS
Maximum open connections to the Transaction PostgreSQL database.
Go default (unlimited)
DB_TRANSACTION_MAX_IDLE_CONNS
Maximum idle connections kept alive for the Transaction database.
Go default (2)
For production workloads, set explicit pool limits to prevent connection exhaustion. A common starting point: MAX_OPEN_CONNS=25, MAX_IDLE_CONNS=10 per database module. Tune based on your PostgreSQL max_connections setting and the number of Midaz replicas.
When enabled, Midaz publishes detailed operation-level audit logs to a RabbitMQ exchange after each transaction. The audit payload includes the full operation data (amounts, accounts, balances before/after) serialized as JSON. You consume these events by binding your own queue to the audit exchange.
When RABBITMQ_TRANSACTION_ASYNC is enabled, Midaz processes transactions asynchronously through RabbitMQ consumers instead of inline during the API request. The bulk recorder further batches database writes for higher throughput.
BULK_RECORDER_* variables only take effect when bothRABBITMQ_TRANSACTION_ASYNC=true and BULK_RECORDER_ENABLED=true.
Variable
Description
Default
RABBITMQ_TRANSACTION_ASYNC
Enables asynchronous transaction processing via RabbitMQ consumers.
false
RABBITMQ_NUMBERS_OF_WORKERS
Number of async consumer worker goroutines.
5
RABBITMQ_NUMBERS_OF_PREFETCH
RabbitMQ prefetch count per worker — controls how many messages each worker buffers at once.
10
BULK_RECORDER_ENABLED
Enables bulk insert mode for operation writes when async processing is active.
true
BULK_RECORDER_SIZE
Batch size for bulk inserts. Set to 0 for automatic sizing based on load.
0 (auto)
BULK_RECORDER_FLUSH_TIMEOUT_MS
Maximum time (in milliseconds) to wait before flushing an incomplete batch.
—
BULK_RECORDER_MAX_ROWS_PER_INSERT
Maximum number of rows per INSERT statement during bulk writes.
Maximum date range (in months) allowed for paginated queries. Limits how far back list endpoints can query. Set to 0 for unlimited range.
3
MAX_PAGINATION_LIMIT
Maximum number of items returned per page in paginated API responses.
100
The pagination date range limit prevents expensive full-table scans on large datasets. If your use case requires querying historical data beyond 3 months, increase this value or set it to 0 — but monitor query performance accordingly.