sync-topic

Installation
SKILL.md

Sync Topic

Typed event streams. Server version uses Redis Streams, browser version uses an in-memory event log. Two consumption modes: reader (consumer groups, at-least-once, commit-based) and live (stateless fan-out/replay).

Decision Guide: reader() vs live()

  • reader(group): durable, at-least-once. Each group tracks its own cursor. Call commit() after processing. Use for event-driven workers (mailer, projections, analytics).
  • live({ after }): stateless fan-out. No group state, no commit. Use for real-time dashboards, debugging, or replay from "0-0".

Decision Guide: topic vs queue

  • topic: events are broadcast to all consumer groups independently. No ack/nack per message — use commit(). Best for fan-out, event sourcing, audit.
  • queue: work items are distributed to exactly one consumer. Use ack()/nack() per message. Best for task distribution, job pipelines. See sync-queue skill.

Gotchas

  • commit() is per-delivery, not per-batch. Always commit after processing each event.
  • Invalid payloads on the read path are auto-acknowledged and skipped (logged, not thrown).
  • reader().stream({ wait: true }) auto-retries transient errors. Do not wrap with retry().
Related skills

More from valentinkolb/sync

Installs
9
First Seen
Mar 4, 2026