Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Source: Redis Streams

The Redis source consumes messages from Redis Streams using consumer groups (XREADGROUP) and delivers them into a pg_tide inbox.

Configuration

SELECT tide.relay_set_inbox_v2(
  jsonb_build_object(
    'name', 'events-from-redis',
    'inbox', 'incoming_events',
    'source', 'redis',
    'config', '{
        "url": "redis://localhost:6379",
        "stream_key": "events:orders",
        "group_name": "pg-tide",
        "consumer_name": "relay-01",
        "batch_size": 100
    }'::jsonb
  )
);

Configuration Reference

ParameterTypeDefaultDescription
source_typestring—Must be "redis"
urlstring—Redis connection URL
stream_keystring—Redis stream key to consume from
group_namestring—Consumer group name
consumer_namestring—Consumer name within the group
batch_sizeint100Messages per XREADGROUP call
passwordstringnullRedis password

Delivery Guarantees

Messages are acknowledged (XACK) only after inbox insertion. Unacknowledged messages remain in the pending entries list (PEL) and are reclaimed on relay restart, ensuring no message loss.

Further Reading