Files
cloudlysis/wiki/Transport-Contracts.md
Vlad Durnea cd124f7d4a
Some checks failed
ci / ui (push) Failing after 29s
images / build-and-push (push) Failing after 20s
ci / rust (push) Failing after 2m26s
docs: generate gitea wiki pages + publish script
add wiki/ markdown pages (Home, Sidebar, architecture, transport, developer, usage)

add scripts/publish_gitea_wiki.sh to sync wiki repo

fix: serialize aggregate env-setting tests to avoid parallel env var races
2026-03-30 14:39:26 +03:00

829 B

Transport Contracts

Context

  • Tenant: HTTP x-tenant-id; NATS tenant-id
  • Correlation: HTTP x-correlation-id; NATS x-correlation-id + correlation-id
  • Trace: HTTP traceparent; NATS traceparent + trace-id

Internal RPC (gRPC)

  • Aggregate: CommandService (submit commands)
  • Projection: QueryService (execute queries)
  • Runner: RunnerAdmin (drain, status, reload)
  • All calls set deadlines and propagate context metadata

NATS JetStream

  • Streams:
    • AGGREGATE_EVENTS: tenant..aggregate..*
    • WORKFLOW_COMMANDS, WORKFLOW_EVENTS
  • Producers set headers: tenant-id, Nats-Msg-Id, correlation, traceparent/trace-id
  • Consumers use AckPolicy::Explicit, bounded ack_wait, max_deliver, max_ack_pending

Routing

  • Gateway routes per-tenant to shards for Aggregate/Projection/Runner
  • Routing tables hot-reload atomically