ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

dual-stream-architecture

Dual-stream event publishing combining Kafka for durability with Redis Pub/Sub for real-time delivery. Use when building event-driven systems needing both guaranteed delivery and low-latency updates. Triggers on dual stream, event publishing, Kafka Redis, real-time events, pub/sub, streaming architecture.

Why use this skill?

Optimize your event-driven systems by combining Kafka's durability with Redis's real-time performance. Install the dual-stream-architecture skill today.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/wpank/dual-stream-architecture
Or

What This Skill Does

The dual-stream-architecture skill provides a robust pattern for event-driven systems that require the best of both worlds: persistence and performance. It works by implementing a dual-publish strategy where events are simultaneously sent to Kafka and Redis. The Kafka stream ensures data durability and fault tolerance, acting as the primary source of truth, while the Redis Pub/Sub stream provides a low-latency pathway for real-time applications like live dashboards, notification systems, or WebSocket-based user interfaces. This architectural pattern prevents the common trade-off between reliable background processing and immediate user feedback.

Installation

To integrate this architecture into your workspace, run the following command in your terminal:

npx clawhub@latest install dual-stream-architecture

Alternatively, for specific repository management:

clawhub install openclaw/skills/skills/wpank/dual-stream-architecture

Use Cases

  • Real-time Dashboards: Displaying live metrics or event logs as they occur without waiting for slow database writes.
  • WebSocket Backends: Pushing live updates to browser clients via Redis, while keeping the main logic processed by Kafka consumers.
  • Complex Event Processing: When you need a fast-path for notification delivery while concurrently storing full event payloads for auditing and historical analysis.
  • Scalable Notification Systems: Routing high-volume updates to distributed services while maintaining a persistent record of every interaction.

Example Prompts

  1. "OpenClaw, implement the DualPublisher struct in my current backend and configure it to target our existing Redis cluster."
  2. "Show me how to refactor my current Kafka-only publisher to use the dual-stream pattern for my real-time analytics module."
  3. "Help me define a custom channel naming convention using the events:{source_type}:{source_id} format to replace my hardcoded string identifiers."

Tips & Limitations

  • Best-Effort Redis: The current implementation treats Redis as 'best-effort'. This is intentional to ensure Kafka writes are never blocked by Redis availability, but be aware that Redis messages can be dropped during network hiccups.
  • Payload Sizing: Keep your Redis payloads lightweight. Since Kafka is your durable store, store the full event payload there and send only necessary metadata or IDs through Redis to keep the real-time stream fast and efficient.
  • Channel Hygiene: Use consistent naming conventions. The provided pattern (events:{source_type}:{source_id}) is optimized for pattern matching in Redis (e.g., PSUBSCRIBE events:user:*).

Metadata

Author@wpank
Stars919
Views0
Updated2026-02-12
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-wpank-dual-stream-architecture": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#event-driven#kafka#redis#streaming#architecture
Safety Score: 4/5

Flags: network-access, code-execution