Redis Streams
Schemes: redis://, rediss://, redis+unix://, valkey://, valkeys://, valkey+unix://
Query parameters recognised as config fields for this connector. The object-typed tls is set with a JSON literal, e.g. ?tls={...}. Any other ?key=value pair is passed through unchanged as a driver option on the connection URL.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
approx_trim | boolean | no | — | (Publisher) Use approximate (~) trimming when maxlen is set. Defaults to true. |
block_ms | integer | no | — | (Consumer) Block timeout in milliseconds for each read. Defaults to 5000ms. |
consumer_name | string | no | — | (Consumer) Consumer name within the group. Defaults to a unique per-instance id. |
group | string | no | — | (Consumer) Group name. Defaults to {APP_NAME}-{stream}; ignored in subscriber_mode. |
internal_buffer_size | integer | no | — | Internal buffer size for the consumer channel. Defaults to 128. |
maxlen | integer | no | — | (Publisher) If set, cap the stream length with XADD MAXLEN. |
password | string | no | — | Optional password for authentication. |
read_from_start | boolean | no | false | (Consumer) On group creation, start from the stream beginning (“0”) not “$”. Default false. |
reader_connections | integer | no | — | (Consumer) Parallel XREADGROUP reader connections fanned out across the group. Default 1. Ignored in subscriber_mode. |
redelivery_timeout_ms | integer | no | — | (Consumer) Redeliver entries pending ≥ this long via XAUTOCLAIM; 0 disables. Default 60000ms. |
stream | string | no | — | The stream key to publish to or read from. Defaults to the route name. |
subscriber_mode | boolean | no | false | (Consumer) Read ephemerally via XREAD from new messages (no group/acks). Default false. |
tls | object | no | see below | TLS: a private CA in ca_file, a client certificate in cert_file and key_file. |
url | string | yes | — | Redis URL, redis:// or rediss:// for TLS. Userinfo is treated as a secret. |
username | string | no | — | Optional username for authentication (Redis ACL). |
Struct-typed fields
tls
TLS configuration for secure connections.
Configures Transport Layer Security (TLS/SSL) for encrypted communication. Supports both client certificate (mutual TLS) and server certificate validation.
Examples
use mq_bridge::models::TlsConfig;
let tls = TlsConfig {
required: true,
ca_file: Some("/path/to/ca.pem".to_string()),
cert_file: Some("/path/to/cert.pem".to_string()),
key_file: Some("/path/to/key.pem".to_string()),
..Default::default()
};
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
accept_invalid_certs | boolean | no | false | If true, disable server certificate verification (insecure). |
ca_file | string | no | — | Path to the CA certificate file. |
cert_file | string | no | — | Path to the client certificate file (PEM). |
cert_password | string | no | — | Password for the private key (if encrypted). |
key_file | string | no | — | Path to the client private key file (PEM). |
required | boolean | no | false | If true, enable TLS/SSL. |