Skip to content
/ eventbox Public

Implementation of ES with Outbox pattern using a task pool in Go

Notifications You must be signed in to change notification settings

mshaa/eventbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Sourcing in Go

This is a playground to explore Event Sourcing, DDD, CQRS, and async architecture in standard lib Go code. The business logic models a greatly simplified e-commerce scenario simulating a distributed system with separate storage per service domain.

Points of Interest

  • Event-sourced aggregates
  • Transactional outbox integrated into task processing
  • Durable async task pool runner
  • Internal event bus with channel draining

Notes and Limitations

  • ES snapshots are not implemented
  • No application entry point — tests only

Storage Support

  • SQLite 3
  • PostgreSQL 9.1+

Running Tests

Use the Makefile:

E2E: make test.gateway

Run all tests: make test.all

Overload the default .env config: make test.all cfg=pg.example for file .env.pg.example

Event Code Generator

  1. Add new event struct declaration in events package: BaseEvent + payload fields.
  2. Update events/generate.go if needed.
  3. Run: make gen.events.

Diagrams

Architecture Flowchart
Event Flow Sequence

References

About

Implementation of ES with Outbox pattern using a task pool in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published