Example: full app with NATS JetStream store (distributed, scalable) #29

Closed
opened 2026-02-19 22:28:40 +00:00 by ash · 2 comments
Owner

What

Complete working example app using NATS JetStream store. Full distributed deployment.

Must Demonstrate

  • All 3 event modeling patterns
  • JetStream stream with subject-per-entity
  • Atomic batch publish (NATS 2.12)
  • Distributed CommandBus via NATS queue groups
  • Single writer per stream across cluster
  • Competing projections via durable pull consumers
  • OCC via ExpectedLastSubjectSequence
  • Watch (live subscription) with catch-up
  • TodoList automation pattern
  • Multi-instance scaling: add/remove nodes dynamically
  • GDPR crypto-shredding
  • Schema evolution
  • HTTP API + SSE live updates

Deployment

  • docker-compose with 3-node NATS cluster + 3 app instances
  • Or connect to existing NATS

Why

This is the "full scale" example. Shows everything eskit can do with NATS.

## What Complete working example app using NATS JetStream store. Full distributed deployment. ## Must Demonstrate - All 3 event modeling patterns - JetStream stream with subject-per-entity - Atomic batch publish (NATS 2.12) - Distributed CommandBus via NATS queue groups - Single writer per stream across cluster - Competing projections via durable pull consumers - OCC via ExpectedLastSubjectSequence - Watch (live subscription) with catch-up - TodoList automation pattern - Multi-instance scaling: add/remove nodes dynamically - GDPR crypto-shredding - Schema evolution - HTTP API + SSE live updates ## Deployment - docker-compose with 3-node NATS cluster + 3 app instances - Or connect to existing NATS ## Why This is the "full scale" example. Shows everything eskit can do with NATS.
Author
Owner

Implemented in commit 0b50908. Full working examples with end-to-end flow tested (HTTP → CommandBus → Decider → Store → Subscription → Projection → HTTP query).

Also fixed library gap: added subscription.StoreAdapter and pgstore.SubscriptionAdapter to bridge the type mismatch between store Event[E] and subscription GlobalEvent[E].

Implemented in commit 0b50908. Full working examples with end-to-end flow tested (HTTP → CommandBus → Decider → Store → Subscription → Projection → HTTP query). Also fixed library gap: added subscription.StoreAdapter and pgstore.SubscriptionAdapter to bridge the type mismatch between store Event[E] and subscription GlobalEvent[E].
ash closed this issue 2026-02-20 08:15:35 +00:00
Author
Owner

Implemented. Full end-to-end flow tested.

Implemented. Full end-to-end flow tested.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ash/eskit#29
No description provided.