ores.cpp.nats-sub-registrar

Table of Contents

This page is the node for the ores.cpp.nats-sub-registrar facet of the codegen template library, part of the ores.cpp technical space. Each archetype below is documented, and holds its mustache source, in its own linked page — this page is the facet-level summary and the routing table to them.

Summary

Two templates forming the per-entity NATS sub-registrar pair. The header declares register_<entity>_handlers(); the implementation includes only that entity's handler header and wires the entity's NATS subjects to the handler instance. The top-level service registrar delegates to each sub-registrar, so a compile failure in one entity's handler cannot block registration of the rest. Consumed by the nats-sub-registrar profile.

The ores.cpp.nats-sub-registrar facet

Projects the entity model onto its messaging registration surface. It consumes the same domain_entity / entity model the nats-handler facet does, and is the wiring counterpart to that handler: the handler defines the operations, this facet subscribes them to subjects.

Mustache incantations

The implementation template branches on two model flags lifted from the entity's C++ ** Flags drawer:

  • no_history — skip the history subject subscription. Set on entities whose protocol/handler has no history operation.
  • list_only — wire only the list subject. Set on read-only lookup entities.

Archetypes

Archetype Description
ores.cpp.nats-sub-registrar.nats_registrar_header Per-entity sub-registrar header declaring register_<entity>_handlers(). nats-sub-registrar profile.
ores.cpp.nats-sub-registrar.nats_registrar_implementation Per-entity sub-registrar implementation wiring NATS subjects to the handler. nats-sub-registrar profile.

See also

Emacs 29.3 (Org mode 9.6.15)