Carve up work with domains
Use domains whenever a team, product surface, or environment needs its own truth:*-dev domains that reuse only the schemas they trust.
Switch domains with dbx checkout
dbx checkout activates a domain (and can create or delete it) without touching other domains:
dbx checkout <name> --createto spin up a new domain for experiments, CQRS bounded contexts, or per-environment isolation.--delete [--force]to remove a domain deliberately; use when retiring experiments.--remote <host[:port]> --token <token> [--remote-tenant <tenant>]to bind a domain to a remote control socket, useful when your write node lives elsewhere.
Evolve schemas gradually
Start in a permissive validation mode while schemas evolve, then restart the daemon with a stricter mode once shapes settle (e.g.,dbx start --restrict=strict).
dbx aggregate snapshot <aggregate> <id> lets you adopt the updated shape without replaying the full stream.
Route only the slices you need
Plugins choose the minimal payload per domain when you rundbx plugin config <type> … --payload <mode>. Modes include all (default), event-only, state-only, schema-only, event-and-schema, and extensions-only (clears payload but keeps metadata/extensions). For process plugins, add --emit-events=false if you want the worker supervised without enqueuing jobs.
Sample workflow
- Create an experiment domain (
payments-fx-dev) for foreign-exchange work. - Copy the core schema and relax validation on new FX fields.
- Attach a log plugin that mirrors only FX aggregates for analysts.
- Once the feature stabilizes, promote the schema to
payments-prodand rehydrate downstream stores by replaying the FX events.