effect-pubsub-event-bus

Installation
SKILL.md

PubSub Event Bus with Effect v4

Overview

Effect's PubSub module provides a typed, composable publish/subscribe primitive. Combined with Stream.fromPubSub and Effect.forkScoped, it replaces imperative callback-based event buses with a fully typed, stream-based subscription model where cleanup is automatic.

When to use this skill:

  • Building intra-service communication (event bus, message broker)
  • Replacing callback-based event systems with typed streams
  • Implementing reactive patterns where services subscribe to domain events
  • Managing per-instance event channels with scoped cleanup

Import Pattern

import { Effect, PubSub, Stream } from 'effect';
Installs
2
First Seen
May 15, 2026