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.
For details, see Appendix.
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>
cert_name: <string>
key_name: <string>
passphrase: <string>
ca_name: <string>
server_name: <string>
min_tls_version: <string>
max_tls_version: <string>
insecure_skip_verify: <boolean>
Configuration
The following fields are used to define the device:
Device
| Field | Required | Default | Description |
|---|---|---|---|
id | Y | - | Unique numeric identifier |
name | Y | - | Device name |
description | N | - | Optional description |
type | Y | - | Must be redis |
tags | N | - | Optional tags |
pipelines | N | - | Optional pre-processor pipelines |
status | N | true | Enable/disable the device |
Connection
| Field | Required | Default | Description |
|---|---|---|---|
address | N | "0.0.0.0" | Redis server address. The console requires it on a new device; a YAML that leaves it out dials 0.0.0.0 |
port | Y | - | Redis server port |
username | N | - | Authentication username |
password | N | - | Authentication password |
channel | Y | - | Channel pattern to subscribe to (supports * wildcard, e.g. logs.*) |
TLS
| Field | Required | Default | Description |
|---|---|---|---|
tls.status | N | false | Enable TLS encryption |
tls.cert_name | N* | - | Client certificate for mutual TLS |
tls.key_name | N* | - | Client private key for mutual TLS |
tls.passphrase | N | - | Passphrase for an encrypted private key |
tls.ca_name | N | - | CA bundle used to verify the server certificate. When unset, the host trust store is used; when set, it replaces the host trust store rather than adding to it. |
tls.server_name | N | - | SNI hostname override for the TLS handshake |
tls.min_tls_version | N | tls1.2 | Minimum accepted TLS version (tls1.0, tls1.1, tls1.2, tls1.3) |
tls.max_tls_version | N | - | Maximum accepted TLS version. When unset, the highest mutually supported version is negotiated. |
tls.insecure_skip_verify | N | false | Skip server certificate verification. Use only for testing. |
* = For mutual TLS only. Only a server that asks for client certificates needs them: most NATS servers and managed Redis services (Azure Cache for Redis, ElastiCache) do not, while a self-hosted Redis with tls-auth-clients yes does.
cert_name | key_name | Result |
|---|---|---|
| empty or left out | empty or left out | the director's own cert.pem and key.pem when it has both, otherwise no client certificate |
| set | empty | that certificate with the director's key.pem, refused when the director has no key.pem |
| empty | set | the director's cert.pem with that key, refused when the director has no cert.pem |
| set | set | both as given |
"Empty" means the field is blank. A field that names a vault secret or an environment variable that resolves to nothing is refused with tls cert or key field not valid, not read as "no certificate". A certificate or key that is named but cannot be read is refused too. The console marks both fields as optional and refuses one without the other.
A director that predates optional client certificates refuses TLS without one on this device. Upgrade the director before you leave both fields empty.
TLS material fields (cert_name, key_name, ca_name, client_ca_name) accept any of the following:
- File name — resolved relative to the service root directory. Nested paths such as
certs/prod/server.pemare supported. - Absolute path — honored only if it resolves inside the service root. Any path that escapes the root is refused.
- Inline PEM content — used verbatim when the value contains
-----BEGIN. - Environment variable —
${ENV_VAR}. - Vault reference —
$secret{id=...}or$secret{store=...,ref=...}.
Performance
| Field | Required | Default | Description |
|---|---|---|---|
reuse | N | false | Enable multi-worker mode |
workers | N | 4 | Number of worker processes when reuse enabled (capped at the number of available CPU cores) |
max_buffer_size | N | 128MB | Ingest buffer admission cap. Also sizes this listener's ingest buffers: 3/8 of this value at start, growing to at most 3x |
max_buffer_size is the ingest-buffer admission cap. Left unset it is 128MB, whose buffers take 48 MiB of heap per listener worker at start and grow to at most 384 MiB as bursts need the room — and with reuse: true a device runs one worker per listener. Size strings are binary, and 32MB and 32MiB are exact synonyms.
See Listener Memory Sizing for the arithmetic, the sizing table, and what happens when the cap is exhausted.
Examples
Basic
Creating a simple Redis Pub/Sub subscriber on a single channel... | |
Secure
Connecting with authentication and TLS encryption... | |
High-Volume
Multi-worker mode for high-throughput consumption... | |
Pattern Subscription
Pattern-based subscription using a wildcard channel... | |
Redis channel patterns support the * wildcard character for matching multiple channels.
Pipelines
Applying custom processing to messages... | |
Pipelines are processed sequentially, and can modify or drop messages before ingestion.