Skip to main content

Configuration

Node Topology ships three independent binaries. Each reads its own environment; there are no config files and no flags. Defaults below come from cmd/api/config.go, cmd/api/telemetry.go, cmd/mcp/main.go, cmd/a2a/main.go, internal/adapters/outbound/postgres/config.go and internal/adapters/outbound/telemetry/telemetry.go.

BinaryRoleDefault portReads Kafka?
cmd/apiREST API, migrations, outbox relay:8080yes (relay + /readyz)
cmd/mcpread-only MCP server (Streamable HTTP):8090no
cmd/a2aread-only A2A agent (JSON-RPC):8093no

All three run on real PostgreSQL; there is no in-memory runtime. A missing mandatory variable is a boot error that names the variable and is raised before any listener binds. Probe, shutdown and outbox semantics are on Runtime and the runbook.

cmd/api​

VariableDefaultRequiredMeaning
DATABASE_URLnoneyesPostgres DSN of the service pool. Boot error missing required environment variable: DATABASE_URL when unset or empty.
MIGRATIONS_DATABASE_URLvalue of DATABASE_URLnoDirect DSN used only for the embedded boot migrations. golang-migrate takes a session advisory lock, which breaks behind a transaction-pooling proxy such as PgBouncer.
KAFKA_BROKERSnoneyesComma-separated host:port list used by the outbox relay and the /readyz metadata check. Entries are trimmed and blanks dropped; an empty result is a boot error naming the variable.
HTTP_ADDR:8080noListen address of the REST API.
OUTBOX_RELAY_INTERVAL1snoPoll interval of the outbox relay: a Go duration (500ms) or plain seconds (2). Malformed or non-positive values log a warning and use the default.
OUTBOX_MAX_ATTEMPTS20noFailures after which the relay stops claiming a row. 0 means unlimited; negative or unparsable values log a warning and use 20 (ADR 0005).
SHUTDOWN_DRAIN_DELAY5snoWait between flipping /readyz to 503 and closing the listener (Go duration). 0 disables it; negative or unparsable values log a warning and use 5s.
LOG_LEVELinfonodebug, info, warn (or warning), error, case-insensitive. Anything else is info.
OTEL_SERVICE_NAMEnode-topologynoservice.name on spans and metrics (and the Loki app label).
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317noCollector OTLP/gRPC endpoint, bare host:port (becomes http://host:port) or a full URL. Export never blocks start-up.
SERVICE_VERSIONdevnoservice.version resource attribute.
ENVIRONMENTlocalnodeployment.environment.name resource attribute.

cmd/mcp​

cmd/mcp runs the same embedded migrations as the api (idempotent, guarded by the advisory lock) so it can boot on a fresh database, but it never starts the relay and never dials Kafka: there is no KAFKA_BROKERS here.

VariableDefaultRequiredMeaning
MCP_ADDR:8090noListen address of the Streamable HTTP MCP endpoint.
DATABASE_URLnoneyesPostgres DSN. Boot error DATABASE_URL is required: this context runs on real Postgres when empty.
MIGRATIONS_DATABASE_URLvalue of DATABASE_URLnoDirect DSN for the boot migrations only.
LOG_LEVELinfonoAs for the api.
OTEL_SERVICE_NAMEnode-topology-mcpnoservice.name on spans and metrics.
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317noCollector OTLP/gRPC endpoint.
SERVICE_VERSIONdevnoservice.version (also in the boot log line).
ENVIRONMENTlocal in telemetry, dev in the boot log linenodeployment.environment.name. The two defaults differ in the code (telemetry.DefaultEnvironment versus the getenv fallback of the boot line); set it explicitly to get one value.

cmd/a2a​

VariableDefaultRequiredMeaning
A2A_ADDR:8093noListen address of the JSON-RPC server (/, /a2a, Agent Card).
A2A_AGENT_URLnoneyesAbsolute http or https URL (with a host) that clients dial; advertised on the Agent Card. Checked first, before anything else starts: unset gives A2A_AGENT_URL is required..., a relative or non-http URL gives A2A_AGENT_URL must be an absolute http(s) URL with a host.
DATABASE_URLnoneyesPostgres DSN. Same boot error as cmd/mcp.
MIGRATIONS_DATABASE_URLvalue of DATABASE_URLnoDirect DSN for the boot migrations only.
LOG_LEVELinfonoAs for the api.
OTEL_SERVICE_NAMEnode-topology-a2anoservice.name on spans and metrics.
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317noCollector OTLP/gRPC endpoint.
SERVICE_VERSIONdevnoservice.version, also the version advertised on the Agent Card.
ENVIRONMENTlocal in telemetry, dev in the boot log linenodeployment.environment.name, same split as cmd/mcp.

Helm values​

charts/node-topology maps the api variables to config.* values (config.httpAddr, config.logLevel, config.outboxRelayInterval, config.outboxMaxAttempts, config.shutdownDrainDelay), kafka.brokers, the database.* Secret references, and the otel.* and environment values. The mcp and a2a components get -mcp and -a2a service names. Details are on the runbook.

Not configurable​

  • Request-body and field limits on the operational profile are constants (ADR 0007), not variables.
  • The Kafka topic (retailnetwork.node-topology.events) is a constant; the service consumes no topic, so there is no consumer-group variable.
  • REST, MCP and A2A are unauthenticated: there are no key or token variables.