Skip to main content

Configuration

Synced from exception-management

This page is a copy of docs/docs/operations/configuration.md on develop, derived from that repository's code. Edit it there, then re-sync.

All configuration is environment variables, read once at boot; a missing mandatory variable is a boot error naming it (every problem is reported at once, before a connection opens or the listener binds). There is no config file and no *_MODE toggle anywhere — the chart refuses to render one.

cmd/api​

VariableRequiredDefaultMeaning
DATABASE_URLyes—Postgres DSN. Real Postgres only; no in-memory mode
KAFKA_BROKERSyes—comma-separated broker list. Real Kafka only
HTTP_ADDRno:8080REST listen address
LOG_LEVELnoinfodebug | info | warn (warning accepted) | error, JSON to stdout
OUTBOX_RELAY_INTERVALno1sGo duration or plain seconds; malformed/non-positive falls back with a WARN
OUTBOX_MAX_ATTEMPTSno20times one outbox row may fail before the relay excludes it (ADR 0005); 0 = unlimited
SLA_SWEEP_INTERVALno1mSLA sweeper tick; malformed/non-positive falls back with a WARN (a typo never silently disables it)
SHUTDOWN_DRAIN_DELAYno5swait after /readyz flips before the listener closes; 0 disables

The six consumer-group variables​

All nine are mandatory even though each names a group the binary's consumers use — the boot check fails closed so a deployment cannot go live missing a pinned group id. They are stable names, fixed in .claude/rules/integration-events.md; renaming one in a running environment re-reads the topic from the start.

VariableConsumes
FULFILLMENT_EXCEPTIONS_CONSUMER_GROUPwarehouse.fulfillment.events
WORK_PLANNING_EXCEPTIONS_CONSUMER_GROUPwarehouse.work-planning.events
NETWORK_FULFILLMENT_EXCEPTIONS_CONSUMER_GROUPwarehouse.network-fulfillment.events
ORDER_CORRELATION_CONSUMER_GROUPwarehouse.order-management.events (auto-resolve correlation)
INVENTORY_EXCEPTIONS_CONSUMER_GROUPwarehouse.inventory.events
RETURNS_EXCEPTIONS_CONSUMER_GROUPwarehouse.returns-processing.events
CARTON_DISCREPANCY_CONSUMER_GROUPwarehouse.inbound-receiving.events (ADR 0006)
YARD_MANAGEMENT_EXCEPTIONS_CONSUMER_GROUPwarehouse.yard-management.events (ADR 0010)
DOCK_SCHEDULING_EXCEPTIONS_CONSUMER_GROUPwarehouse.dock-scheduling.events (ADR 0010)
OUTBOUND_SHIPPING_EXCEPTIONS_CONSUMER_GROUPwarehouse.outbound-shipping.events (ADR 0011)

cmd/mcp​

VariableRequiredDefaultMeaning
DATABASE_URLyes—same Postgres as cmd/api
MIGRATIONS_DATABASE_URLnoDATABASE_URLdirect (non-pooled) DSN used only for the boot migrations — golang-migrate's session-scoped pg_advisory_lock cannot pass through PgBouncer transaction pooling
MCP_ADDRno:8090Streamable HTTP listen address (paths / and /mcp, plus open GET /healthz)
LOG_LEVELnoinfoas above

The MCP binary reads no Kafka variable: it never dials Kafka, never starts the relay, the consumers or the sweeper.

cmd/a2a​

VariableRequiredDefaultMeaning
DATABASE_URLyes—same Postgres as cmd/api
MIGRATIONS_DATABASE_URLnoDATABASE_URLdirect (non-pooled) DSN used only for the boot migrations, as for cmd/mcp
A2A_AGENT_URLyes—absolute http(s) URL of this agent's JSON-RPC endpoint, advertised on the Agent Card (the chart defaults it to the in-cluster Service DNS http://<release>-a2a.<ns>.svc.cluster.local:8093/); the binary refuses to boot without it
A2A_ADDRno:8093listen address (JSON-RPC at / and /a2a, the card at /.well-known/agent-card.json, open GET /healthz)
LOG_LEVELnoinfoas above

Like the MCP binary, the A2A agent is read-only and reads no Kafka variable: it never dials Kafka, never starts the relay, the consumers or the sweeper (ADR 0007).

Helm​

charts/exception-management/values.yaml maps every key 1:1 to an env var (config.outboxRelayInterval → OUTBOX_RELAY_INTERVAL, config.slaSweepInterval → SLA_SWEEP_INTERVAL, …) and the chart refuses to render without database.url / database.existingSecret and kafka.brokers. The MCP server is a separate component, disabled by default:

mcp:
enabled: true # component=mcp, Service <fullname>-mcp:8090
a2a:
enabled: true # component=a2a, Service <fullname>-a2a:8093 (A2A_AGENT_URL defaults to its DNS name)

Probe wiring and the shutdown budget are on the Runbook page.