Subscriptions
Internal pub/sub reactions with optional idempotency.
Subscriptions allow you to react to internal events published via ctx.pubsub.publish(...). They are the choreography layer for decoupling business flows.
Defining a Subscription
Publishing Events
Events are published from actions or other handlers using the context:
Idempotency
Mark subscriptions as idempotent: true with a stable name to deduplicate cross-process delivery. This is important when multiple runtime instances are running:
The runtime uses _chimpbase_sub.seen:* markers to track which events have been processed.
Multiple Subscribers
Multiple subscriptions can listen to the same event: