TxLoomTxLoom
Home
  • What is TxLoom?
  • How It Works
  • Features
  • Screenshots
  • Demo Videos
  • Installation Guide
  • Configuration
  • Scenario Spec
  • Under the Hood
Home
  • What is TxLoom?
  • How It Works
  • Features
  • Screenshots
  • Demo Videos
  • Installation Guide
  • Configuration
  • Scenario Spec
  • Under the Hood
  • Getting Started

    • Installation Guide
    • Configuration
    • Scenario Spec

Configuration

docker compose up works with no configuration. This page covers the deployment settings you can change: environment variables, connections and global defaults.

What a simulation contains is configured separately, in the scenario spec.

Compose Variables

docker-compose.yml reads these from a .env file next to it. Copy .env.example to .env to change them.

VariableDefaultDescription
MYSQL_ROOT_PASSWORDtxloomMySQL root password
MYSQL_USERtxloomMySQL user for TxLoom
MYSQL_PASSWORDtxloomMySQL password for TxLoom

Service Variables

These are read by the api and worker processes. The first four are already set by docker-compose.yml.

VariableDefaultRead byDescription
DATABASE_URLset by composeapi, workerMySQL connection string
REDIS_URLset by composeapi, workerRedis connection string
DATA_DIR/data in composeapi, workerWhere run outputs and the instance key are stored. Both services must see the same directory.
PORT3000apiHTTP port
HOST0.0.0.0apiBind address
TXLOOM_INSTANCE_KEYgeneratedapi, worker32 bytes, hex-encoded. Overrides the key file used to encrypt connection secrets.
TXLOOM_CONNECTIONS_JSONunsetapiConnections created at startup. See below.
TXLOOM_LOCAL_KAFKAkafka:29092apiAddress probed at startup to register the local-kafka connection

Tuning

VariableDefaultRead byDescription
TXLOOM_MAX_WORKER_THREADSCPUs − 1, limited by memoryapi, workerPartitions one worker generates at once. The default never plans to use more than about 60% of memory at 1 GiB per thread.
TXLOOM_PARTITION_CHUNK_SIZE20000apiConsumers per generation partition
TXLOOM_MAX_STREAMS4api, workerLive streams that can run at once
TXLOOM_MAX_DELIVERIES4workerHistory replays that can run at once
TXLOOM_MAX_EXPORTS2workerExports that can be built at once

Setting service variables with Docker Compose

The TXLOOM_* variables are not passed through by the shipped docker-compose.yml. Add them under environment: for the service that reads them, for example in a docker-compose.override.yml:

services:
  api:
    environment:
      TXLOOM_MAX_STREAMS: "8"
  worker:
    environment:
      TXLOOM_MAX_STREAMS: "8"
      TXLOOM_MAX_WORKER_THREADS: "6"

Set a variable on every service listed in its "Read by" column.

CLI

VariableDefaultDescription
TXLOOM_API_URLhttp://localhost:3000/api/v1API the CLI talks to

Connections

A connection is a saved Kafka cluster, RabbitMQ broker or webhook endpoint. Manage them on the Connections page, through /api/v1/connections, or with the CLI. Each non-file sink in a spec is sent to a connection of the same type when a run is launched.

Kafka

FieldRequiredDescription
bootstrap_serversyesList of host:port
security_protocolyesPLAINTEXT, SSL, SASL_PLAINTEXT or SASL_SSL
sasl_mechanismwith SASLPLAIN, SCRAM-SHA-256 or SCRAM-SHA-512
ca_pemnoCA certificate. Allowed with SSL and SASL_SSL only.
default_topicyesTopic used when a launch does not override it
partition_key_fieldnoAccepted but not yet applied. Messages are always keyed by consumer_id.
Secretswith SASLusername, password

RabbitMQ

FieldRequiredDescription
hostyesBroker host
portnoBroker port
vhostnoVirtual host
tlsnoUse TLS
ca_pemnoCA certificate. Allowed with tls only.
exchangeyesExchange to publish to
exchange_typeyesdirect, topic or fanout
default_routing_keyyesRouting key used when a launch does not override it
Secretsnousername, password

Webhook

FieldRequiredDefaultDescription
urlyeshttp:// or https:// endpoint. Each event is sent as a JSON POST.
timeout_msno5000Per-request timeout, 100 to 60000
max_attemptsno5Attempts before a delivery is dropped, 1 to 10
Secretsnoheaders: extra request headers, for example an authorization token

Testing a connection

Test runs from the worker and reports the stage that failed: connect, TLS, auth or topic. A connection can be tested before it is saved.

Kafka addresses inside Docker

A connection is used by the worker container, so localhost:9092 points at the worker itself. For the bundled demo broker use kafka:29092. For a broker on your machine, use an address the container can reach, such as host.docker.internal:9092, and make sure the broker advertises that address.

Secrets

  • Passwords and webhook headers are write-only. The API returns has_credentials: true and never the values.
  • They are encrypted at rest with AES-256-GCM under one instance key.
  • The key is generated on first start at data/keys/instance.key, or supplied with TXLOOM_INSTANCE_KEY.
  • A CA certificate is public and is stored with the connection's settings.

Back up the instance key

If data/keys/instance.key is lost, saved passwords and headers cannot be recovered and must be entered again. Broker addresses and topics are not affected.

Connections from the environment

TXLOOM_CONNECTIONS_JSON holds a JSON array of connections created when the API starts. They appear read-only in the studio (managed_by: env) and cannot be edited or deleted there.

[
  {
    "type": "kafka",
    "name": "staging-kafka",
    "config": {
      "bootstrap_servers": ["broker-1.internal:9093"],
      "security_protocol": "SASL_SSL",
      "sasl_mechanism": "SCRAM-SHA-512",
      "default_topic": "txloom.events"
    },
    "secrets": { "username": "txloom", "password": "change-me" }
  }
]

This variable contains secrets. Treat it as you would any other credential.


Global Defaults

Settings in the studio stores two global defaults: a default currency and a default locale. The same page shows the MCP server address and the authoring docs link for AI agents.


Where Data Is Stored

MySQL holds scenarios, spec versions, run records and connections. Everything a run produces is under the data directory:

data/
├── keys/instance.key              # encrypts connection secrets
└── runs/<run_id>/
    ├── truth/                     # truth events, one Parquet file per partition
    ├── labels/                    # answer key: fraud labels
    ├── delivered/<sink>/          # each sink's delivered copy and its labels
    ├── exports/<export_id>/       # files built from the Export tab
    ├── report.json                # realism report
    └── stream-labels.jsonl        # labels for events sent on a live stream

Deleting a run's outputs removes its folder. The run record, with its spec snapshot and seed, stays in MySQL so the run can be regenerated.

Prev
Installation Guide
Next
Scenario Spec