Tempest Source for Redis

This library polls for messages from a Redis Streams source.

Install

Cargo.toml

[dependencies] tempest-source-redis = "0.1.0"

Usage

```rust use tempestsourceredis::prelude::*;

// create a type alias to the RedisStreamSourceBuilder type Source = RedisStreamSourceBuilder<'a>;

// configure a topology with this source struct MyTopology {} impl Topology for MyTopology { // implementation code here } ```

Topology.toml Config

You can configure RedisStreamSource at runtime by adding this to your Topology configuration file:

```toml [source.config]

redis connection uri

uri = "redis://127.0.0.1:6379/0"

redis stream key

key = "some-key"

redis stream group to use

group = "abc234"

number of stream messages to read per xreadgroup

readmsgcount = 1000

time in milliseconds for how often

to poll for new stream messages

poll_interval = 1

max poll backoff in milliseconds

max_backoff = 30000

configure blocking reads

blocking_read = true

msgid to begin reading from

groupstartingid = "0000"

how often should the source check for new

message to batch ack

ack_interval = 100

ack strategy

ackpolicy = { type = "Batch", value = 1000} ackpolicy = { type = "Individual" }

monitor interval is used to handling messages

from xpending

monitor_interval = 10000

actions to take on pending message

pendinghandlers = [ { action = {type = "Delete"}, minidletime = 100000, timesdelivered = 5}, { action = {type = "Ack"}, minidletime = 10000, timesdelivered = 10}, { action = {type = "Claim"}, minidletime = 200000, timesdelivered = 1}, ] ```