Skip to main content

Redis

Synopsis

Creates a Pub/Sub subscriber that connects to Redis servers and processes messages from specified channels. Supports authentication, TLS encryption, and multiple workers with automatic message handling.

Schema

- id: <numeric>
name: <string>
description: <string>
type: redis
tags: <string[]>
pipelines: <pipeline[]>
status: <boolean>
properties:
address: <string>
port: <numeric>
username: <string>
password: <string>
channel: <string>
reuse: <boolean>
workers: <numeric>
tls:
status: <boolean>
insecure_skip_verify: <boolean>
cert_name: <string>
key_name: <string>

Configuration

Device

FieldRequiredDefaultDescription
idY-Unique numeric identifier
nameY-Device name
descriptionN-Optional description
typeY-Must be redis
tagsN-Optional tags
pipelinesN-Optional pre-processor pipelines
statusNtrueEnable/disable the device

Connection

FieldRequiredDefaultDescription
addressN"0.0.0.0"Redis server address
portY-Redis server port
usernameN-Authentication username
passwordN-Authentication password
channelY-Channel pattern to subscribe to (supports * wildcard, e.g. logs.*)

TLS

FieldRequiredDefaultDescription
tls.statusNfalseEnable TLS encryption
tls.insecure_skip_verifyNfalseSkip TLS certificate verification
tls.cert_nameY*-TLS certificate file name
tls.key_nameY*-TLS private key file name

* = Conditionally required when tls.status is true.

note

The TLS certificate and key files must be placed in the service root directory.

Performance

FieldRequiredDefaultDescription
reuseNfalseEnable multi-worker mode
workersN4Number of worker processes when reuse enabled (capped at the number of available CPU cores)

Examples

Basic

Creating a simple Redis Pub/Sub subscriber on a single channel...

- id: 1
name: basic_redis
type: redis
properties:
address: "redis.example.com"
port: 6379
channel: "logs"

Secure

Connecting with authentication and TLS encryption...

- id: 2
name: secure_redis
type: redis
properties:
address: "redis.example.com"
port: 6379
username: "subscriber"
password: "secret"
channel: "secure.logs"
tls:
status: true
cert_name: "redis.crt"
key_name: "redis.key"

High-Volume

Multi-worker mode for high-throughput consumption...

- id: 3
name: performant_redis
type: redis
properties:
address: "redis.example.com"
port: 6379
channel: "high-volume"
reuse: true
workers: 4

Pattern Subscription

Pattern-based subscription using a wildcard channel...

- id: 4
name: pattern_redis
type: redis
properties:
address: "redis.example.com"
port: 6379
channel: "logs.*"
reuse: true
workers: 2
tip

Redis channel patterns support the * wildcard character for matching multiple channels.

Pipelines

Applying custom processing to messages...

- id: 5
name: pipeline_redis
type: redis
pipelines:
- json_parser
- field_extractor
properties:
address: "redis.example.com"
port: 6379
channel: "raw.logs"
note

Pipelines are processed sequentially, and can modify or drop messages before ingestion.