Skip to content

rdt-model-event

rdt-model-event publishes events to the Solace enterprise event bus when a data product is created or updated. Downstream consumers can subscribe to these events to react to data product lifecycle changes — for example, triggering dependent pipeline refreshes or notifications.

Pipeline phase: Phase 6 — Support

Access status: Resolved (2026-05-07) — client certificate auth confirmed working.

Terminal window
cargo run -p rdt-model-event -- --target dev publish --entity waste-tracking --dry-run

All credentials are loaded from Vault via source scripts/vault-env.sh.

VariableSourceDescription
SOLACE_BROKER_URLVault secret/{target}/solaceBroker REST endpoint
SOLACE_CLIENT_CERTVault secret/{target}/solacePEM certificate (full chain)
SOLACE_CLIENT_KEYVault secret/{target}/solacePEM private key
SOLACE_TOPICVault secret/{target}/solaceTarget topic for events
SOLACE_USERVault secret/{target}/solaceBroker user (RXPMODE0)

In addition to explicit lifecycle event publishing, every CLI module automatically publishes a lightweight execution event to Solace after completing its run. This is handled by the shared events module in rdt-model-common — individual modules do not implement this themselves.

{
"module": "rdt-model-pull",
"run_id": "019600ab-cdef-7123-89ab-0123456789ab",
"status": "ok",
"entity_id": "waste-tracking",
"duration_ms": 1247,
"timestamp": "2026-05-07T14:23:01.123Z",
"target": "dev"
}
  1. Every module calls cli.global.publish_context(&config) to create a PublishContext
  2. When ModuleResultBuilder::finish(&ctx) is called, it automatically publishes the event
  3. Publishing is fire-and-forget — failures are logged as warnings but never crash the module
  4. In dry-run mode or without Solace credentials configured, publishing is silently skipped

The --run-id flag (or RDT_RUN_ID env var) provides a UUIDv7 correlation ID. When the orchestrator (rdt-model-compile) runs multiple modules in parallel, it passes the same run ID to all children, enabling correlation of events from a single pipeline execution.

The finish() method requires a &PublishContext parameter. Any module that omits it will not compile — this ensures no module can skip event publishing.

Pharma/Tech/Solace/InterLayer/PRC/1/RSVD/RSVD/Created/v1/SYS/CLI-EXECUTE

Client certificate (PEM) via reqwest::Identity::from_pkcs8_pem(). Certificate is issued by Roche G3 Issuing CA 3, CN=RXPMODE0, expires 2028-05-05.

All Phase 5 Register modules should complete first.

Event published to Solace topic (no local file output).

Terminal window
./scripts/check-solace-access.sh # dev
./scripts/check-solace-access.sh test # test