ores.trading.service
Table of Contents
Summary
ores.trading.service is the NATS service entrypoint for the trading domain.
It is a thin wiring layer: it reads configuration, opens database and NATS
connections, registers all message handlers from ores.trading.core, and runs
the event loop. All business logic lives in ores.trading.core; this component
is responsible only for bootstrap, dependency injection, and graceful shutdown.
Inputs
- Configuration file: NATS server URL, PostgreSQL connection string, logging settings, and environment name.
- NATS request messages from Qt clients and peer services on the
ores.trading.*subject hierarchy.
Outputs
- A running NATS service handling all trading operations (0x5000–0x5FFF range).
- NATS response messages returned to callers.
- Structured logs to the configured log sink via
ores.logging.
Entry points
src/main.cpp— process entry point; initialises logging and starts the application.src/application.cpp— bootstraps all subsystems and wires dependencies.src/host.cpp— manages the NATS connection and handler registration loop.src/config/— configuration parsing and validation.
Dependencies
ores.trading.core— all NATS handlers, repositories, and domain services.ores.trading.api— shared protocol types.ores.logging— structured logging infrastructure.nats.c— NATS client for connection management.
See also
- ores.trading — component group overview.
- ores.trading.core — all business logic for the trading domain.
