event-driven

Document a Redis-based composite event bus pattern with SSE delivery.

3|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/eco2-team/backend --skill event-driven-eco2-team
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: event-driven
Source: https://github.com/eco2-team/backend/tree/main/.claude/skills/event-driven
Command: npx skills add https://github.com/eco2-team/backend --skill event-driven-eco2-team

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Redis-based real-time systems require reliable event propagation across multiple components (producers, router, and client-facing gateway). This guide provides a structured pattern to build a composite event bus with idempotent processing, fault recovery, and multi-domain support.

Core Features & Use Cases

  • Composite Event Bus pattern unifies Producers → Event Router → SSE Gateway using Redis Streams, Pub/Sub, and State KV.
  • Idempotent processing and reclaimer mechanisms prevent duplicate processing and ensure recovery after failures.
  • Multi-domain support enables independent streams and state management per domain.
  • Real-time client streaming through SSE Gateway with Last-Event-ID recovery.

Quick Start

  • Deploy the Event Bus by loading this skill and provisioning a Redis instance.
  • Start the Event Router and SSE Gateway components and connect them to the same Redis.
  • Publish an event from a worker and observe it streamed to clients via SSE.

Frequently Asked Questions about event-driven

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a real-time event bus with Redis Streams and Pub/Sub?

A real-time event bus with Redis uses Streams for persistent event delivery, Pub/Sub for messaging, and State KV for idempotence. This pattern connects producers, an event router, and an SSE gateway to ensure atomic state updates and reliable fault recovery across multiple domains.

How does Redis Streams handle idempotent event processing and fault recovery?

Idempotent event processing with Redis Streams uses State KV to track processed events and a pending-entry recovery mechanism. This ensures that if a consumer fails, a multi-domain reclaimer can safely reprocess events without duplication, enforcing publish-on-success semantics.

Can I use Redis Pub/Sub and SSE for real-time client streaming with Last-Event-ID recovery?

Yes, an SSE gateway can stream Redis Pub/Sub messages to clients while using Last-Event-ID for recovery. The event router manages state via Redis Streams, allowing clients to reconnect and resume real-time event delivery without losing messages.

What is the best way to prevent duplicate processing in a multi-domain Redis event bus?

To prevent duplicate processing in a multi-domain Redis event bus, enforce atomic state updates and publish-on-success semantics. Using independent streams and State KV per domain ensures isolated tracking and reliable reclaimer orchestration during failures.

Does a Redis composite event bus support atomic state updates and multi-domain reclaimer orchestration?

Yes, a Redis composite event bus supports atomic state updates and multi-domain reclaimer orchestration. It separates streams and state management per domain, allowing reclaimers to independently recover pending entries and ensure consistent event propagation.

Why does my Redis event router drop messages during consumer failures?

Redis event routers may drop messages during consumer failures if lacking pending-entry recovery. Implementing a reclaimer mechanism with Redis Streams ensures failed consumers are tracked and events are safely reprocessed, maintaining reliable event delivery.