Skip to content

Backends

goes is backend-agnostic. Your application code uses interfaces (event.Store, event.Bus), and you plug in concrete implementations at startup.

Available Backends

ComponentBackendPackage
Event StoreMongoDBbackend/mongo
Event StorePostgreSQLbackend/postgres
Event StoreIn-Memoryevent/eventstore
Event BusNATSbackend/nats
Event BusIn-Memoryevent/eventbus
Snapshot StoreMongoDBbackend/mongo
Model RepositoryMongoDBbackend/mongo
Model RepositoryIn-Memorybackend/memory

Choosing a Backend

For development and testing: Use the in-memory event store and bus. No external dependencies, instant setup.

For production: Use MongoDB or PostgreSQL for the event store (persistent, queryable) and NATS for the event bus (distributed, reliable).

Backend Guides

  • MongoDB — event store, snapshot store, model repository
  • PostgreSQL — event store
  • NATS — event bus with Core and JetStream
  • In-Memory — for testing and prototyping