Skip to content

Conversation

@psteinroe
Copy link
Owner

@psteinroe psteinroe commented Jan 7, 2026

Summary

  • Add RedisStreamsSink that publishes events to Redis Streams using XADD
  • Sends event.payload as JSON in a single "payload" field
  • Supports dynamic stream routing via event metadata
  • Supports optional max_len for approximate stream trimming (MAXLEN ~)

Configuration

sink:
  type: redis-streams
  url: redis://localhost:6379
  stream_name: events  # optional default stream
  max_len: 10000       # optional trimming

Routing

The target stream is resolved from:

  1. stream field in event metadata (from subscription's metadata or metadata_extensions)
  2. Fallback to stream_name in config
-- Dynamic stream from table name
metadata_extensions = '[{"json_path": "stream", "expression": "''events:'' || tg_table_name"}]'

@psteinroe psteinroe force-pushed the feat/sink-redis-streams branch 2 times, most recently from 63bcd99 to 66d4d25 Compare January 13, 2026 06:56
Add a Redis Streams sink that appends events to Redis streams.

Features:
- Configurable stream name prefix and max length (MAXLEN ~)
- Dynamic stream routing via metadata
- Batch operations using Redis pipeline for efficiency
- Single-pass processing for optimal performance
@psteinroe psteinroe force-pushed the feat/sink-redis-streams branch from 66d4d25 to 760a393 Compare January 13, 2026 06:59
@psteinroe psteinroe merged commit b69fe64 into main Jan 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants