Task: Namespace feed source_name/NATS subject by collection
This page documents a task in the Synthetic data collections: Basic and Realistic story. It captures the goal, current status, acceptance, and any notes or results.
Goal
Today source_name=/NATS subjects are per-pair only (e.g.
=synthetic.eurusd), so two collections configuring the same pair would
collide. Prefix with the owning collection:
synthetic.basic.eurusd / synthetic.realistic.eurusd, in
projects/ores.synthetic/service/src/feed_controller.hpp and wherever
source_name is derived/displayed in the Qt client
(FxSpotRateEditor, MarketSimulatorWindow).
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Synthetic data collections: Basic and Realistic |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-07-03 |
Acceptance
- Running the same pair (e.g. EUR/USD) under both
BasicandRealisticcollections concurrently produces two distinct, non-colliding NATS subjects andmarket_observation.sourcevalues. - Existing single-collection deployments (
ore_analytics) keep working — namespacing is additive, not a breaking rename without a migration path.
Plan
Delivered as two layers rather than one, once the real requirement became clear mid-implementation (the tree needed to show/act on the hierarchy, not just avoid subject collisions):
source_nameis nowsynthetic.<collection>.<pair>(e.g.synthetic.basic.eurusd/synthetic.realistic.eurusd), set both byores_synthetic_publish_fx_spot_configs_from_dq_fnand byFxSpotRateEditor::defaultSourceName()for manual creation.- A generic
ores.synthetic.folderentity (self-referencing hierarchy, see the sibling folder/vintage-validity tasks) gives the collection/ asset-class/instrument-type structure real, queryable identity instead of being encoded in the string at all –source_nameended up staying a simple display/NATS-subject string oncefolder_idexisted to carry the actual hierarchy.
Notes
PRs
| PR | Title |
|---|---|
| #1611 | [synthetic] Generic folder hierarchy, folder-cascade start/stop, vintage-validity indicator |
Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
Result
Two collections (Basic + Realistic) verified concurrently side by side for
the same party, correctly namespaced (synthetic.basic.*=/
=synthetic.realistic.*), no subject/source collisions. Superseded the
original string-only design with a real folder hierarchy once it became
clear the Market Simulator tree grouping and folder-scoped start/stop
(sibling tasks) needed queryable structure, not just a namespaced string.