Bounded-context service crate for the process view.
Kubernetes naming uses process-api for the workload to avoid colliding with the Kubernetes Service suffix, but the git repo and crate name stay fscl-process-svc.
The crate currently compiles in an earlier design state. It is not yet migrated to use ComponentLifecycleUow end to end, and its future NATS-consumer role is scaffolded at the deployment layer rather than fully implemented in-process.
fscl-process-svc
|
+--> fscl_core
|
+--> migration
dev / k8s runtime
|
+--> sidecar fscl-outbox-publisher
And the deployment-level relationship is:
process-api container --> PostgreSQL
process-api container --> NATS consumer role (scaffolded)
outbox-publisher sidecar --> PostgreSQL outbox
outbox-publisher sidecar --> NATS publisher role
fscl-process-svc -> HTTP API, process view persistence, current app logic
fscl_core -> shared domain/application contracts
fscl-messaging -> shared outbox/wire contract, used indirectly today
fscl-outbox-publisher -> sidecar publisher runtime
Runtime values are read from process environment variables (shell or container).
Current local config points:
DB_TYPE: database scheme, currentlypostgresDB_HOST: database hostDB_PORT: database portDB_USER: database userDB_PASSWORD: database passwordDB_NAME: process bounded-context database nameAPP_HOST: bind address for the HTTP serverAPP_PORT: bind port for the HTTP serverNATS_URL: reserved for the process-api consumer role and shared local setupNATS_JETSTREAM_STREAM: target JetStream stream name for the bounded contextNATS_JETSTREAM_DURABLE_CONSUMER: durable consumer name forprocess-apiNATS_JETSTREAM_ACK_POLICY: intended acknowledgement policyNATS_JETSTREAM_ACK_WAIT: intended acknowledgement timeout
Today the DB settings are used by the running crate. The NATS consumer settings are scaffolding for the target architecture.
Load local dev secrets from the compose helper:
source ../compose/load-secrets.shFor host-side API debugging, load process-api runtime variables:
source ../compose/load-process-api-env.shRun tests/build locally:
cd fscl-process-svc
cargo test
cargo runRun the local dev stack:
source ../compose/load-secrets.sh
docker compose -p fscl -f ../compose/process-stack.yaml upThe service currently applies its own SeaORM migration on startup.
Scaffold only for now.
Relevant manifests live under fscl/doc/rust/fscl-k8s:
15-process-messaging.yaml: shared messaging runtime values for the bounded context20-process-api.yaml:process-apideployment and sidecar wiring22-outbox-publisher.yaml: publisher-local settings30-postgres.yaml: bounded-context database
Target workload split:
process-api pod
|- process-api container -> serves HTTP, will consume NATS events
|- outbox-publisher sidecar -> relays DB outbox rows to NATS
The database-owning service remains responsible for applying both its own schema and the shared outbox schema.