Story: NNG message broker attempt

Table of Contents

This page documents a story in Sprint 14. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

Goal

Stand up an NNG-based message broker with JWT-in-frame + service self-registration. The architecture got implemented but the hook-up to the comms service was cancelled in favour of NATS.

Status

Field Value
State DONE
Parent sprint Sprint 14
Now Completed 2026-03-12.
Waiting on None.
Next None.
Last touched 2026-03-12

Acceptance

  • ores.mq.broker executable on NNG.
  • JWT in message frames (protocol 50.0).
  • Broker protocol messages for register + token refresh.
  • auth_session_service refactored for JWT validation.
  • Service self-registration logic in ores.comms.service at startup.

Tasks

Task State Start End Description
Implement NNG message broker DONE 2026-05-20 2026-03-12 Stand-alone ores.mq.broker executable on NNG; JWT embedded in message frames via jwt_size field (protocol 50.0); CRC includes JWT bytes; register_service_request/response + token_refresh_request/response broker messages; auth_session_service refactored for JWT validation; ores.comms.service self-registers handled message-type ranges at startup; nng_service_runner adapter; asynchronous dispatch via boost::asio::co_spawn.

Decisions

Cancelled before final hook-up
the v0 entry Hook up broker and comms service was CANCELLED with the note we have introduced the broker but we did not validate that the infrastructure works as expected. NATS got us a complete messaging story faster.
JWT-in-frame survives
the JWT-in-frame design + JWT validation refactor outlasted the NNG broker; both inform the NATS path.

Out of scope

  • NNG production readiness — abandoned mid-validation.

See also

Emacs 29.1 (Org mode 9.6.6)