Build a Simple Event Bus
Build a Simple Event Bus in TypeScript: Publish/subscribe with isolated subscriber failures. Readable code with a live playground.
Publish/subscribe with isolated subscriber failures.
Related
- Microservices Lab — Lab
Other builds
- Build Your Own Cache — put(), get(), LRU eviction and TTL expiry.
- Build a Consistent Hash Ring — Virtual nodes and minimal key movement when servers change.
- Build a Mini Message Broker — Topics, partitions, offsets and consumer groups in ~100 lines.
- Build a Retry Mechanism — Exponential backoff with jitter and a retry budget.
- Build a Circuit Breaker — Closed, open and half-open states with a failure threshold.
- Build a Repository — A collection-like interface backed by an in-memory store.
- Build a Unit of Work — Track new, dirty and removed objects; commit them together.
- Build a Simple CQRS System — Commands update a write model; events project read models.