Skip to main content
Version: 0.7.x
input/redisINPUTBUFFERPROCESSOROUTPUT

Redis

The Redis input reads from Redis with both standalone and cluster connection modes, and supports Subscribe (channels / patterns) and List consumption modes. As a channel-based input it follows the engine's cancellation-safety contract: dropping a pending read never loses an already-decoded message (see Input Delivery Semantics).

Configuration​

FieldTypeRequiredDefaultDescription
typestringyes—Constant value "redis"
modeobjectyes—Connection mode (tagged enum), see table below
redis_typeobjectyes—Consumption mode (tagged enum), see table below

mode​

FieldTypeRequiredDescription
typestringyes"single" or "cluster"
urlstringyes (single)Standalone URL, e.g. redis://host:6379
urlsarray<string>yes (cluster)List of cluster node URLs

redis_type (subscribe)​

FieldTypeRequiredDescription
typestringyes"subscribe"
subscribeobjectyesSubscription configuration, see below

subscribe:

FieldTypeRequiredDescription
typestringyes"channels" or "patterns"
channelsarray<string>yes (channels)List of channels
patternsarray<string>yes (patterns)List of patterns

redis_type (list)​

FieldTypeRequiredDescription
typestringyes"list"
listarray<string>yesList of Redis list keys to consume

Examples​

input:
type: "redis"
mode:
type: "single"
url: "redis://localhost:6379"
redis_type:
type: "subscribe"
subscribe:
type: "channels"
channels:
- "news"
- "events"
input:
type: "redis"
mode:
type: "single"
url: "redis://localhost:6379"
redis_type:
type: "list"
list:
- "tasks"
- "notifications"

Durability​

Both modes use a no-op acknowledgement, which caps delivery at at-most-once:

  • List mode consumes destructively (BLPOP): once an element is popped it is gone from Redis. If the pipeline fails or crashes after delivery, the message is lost — it cannot be re-read.
  • Subscribe mode is fire-and-forget by Redis semantics: messages published while the consumer is down or reconnecting are never delivered.

The cancellation-safety guarantee above only protects an already-decoded message from being lost by a drop of the pending read — it does not make the source replayable. For durable consumption, front Redis with a replayable source (e.g. Kafka), or enable stream-level WAL durability with a source that supports replay.

Error behavior​

Transient failures (connection loss, timeouts, IO) surface as Disconnection and the engine reconnects with backoff. Deterministic rejections — authentication, permission, unknown command — are fatal in both modes: subscription setup reports them from connect(), and the List-mode poller forwards them instead of looping. The temporary/permanent judgment is structural (the driver's error kind and the exact protocol code, e.g. NOAUTH/WRONGPASS/NOPERM), never message wording: a message merely containing "invalid" does not turn an otherwise transient error into a fatal one. Errors from each reconnect attempt (connect() failing while the server is down) are retried by the kernel's reconnect loop until the connection succeeds.