Task: Implement NATS support

Table of Contents

This page documents a task in the NATS migration story. It captures the goal, current status, acceptance, and any notes or results.

Goal

Replace the entire binary protocol stack with NATS — the messaging-infrastructure pivot of the sprint.

Status

Field Value
State DONE
Parent story NATS migration
Now Completed 2026-03-15.
Waiting on None.
Next None.
Last touched 2026-03-15

Acceptance

  • Old binary-protocol stack removed (SSL/ASIO transport + NNG broker): ~107k lines deleted.
  • New ores.nats component with nats::service::client interface: ~20k lines added.
  • All 10 domain services migrated to NATS request/reply with full CRUD handlers: iam, variability, refdata, assets, trading, dq, reporting, scheduler, synthetic, telemetry.
  • ores.comms.shell + ores.http.server re-enabled on the NATS transport.
  • ores.qt GUI client migrated.
  • NATS subject prefixes ores.{tier}.{instance} for environment isolation.
  • _INBOX.* reply-subject prefixing bug fixed (had been breaking all request/reply).
  • rfl::Reflector<cron_expression> for scheduler private-member serialisation.
  • Pgmq-based ores.mq removed in favour of JetStream via jetstream_admin in ores.nats.

Plan

Captured during execution; cleared into the parent story on close.

Notes

NNG seemed like a lot of work — NATS got us a standard, scalable, microservice-friendly base much faster.

Result

Entire transport replaced with NATS; ores.mq gone.

Emacs 29.1 (Org mode 9.6.6)