Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

sdk-streams

Experimental.

temporalio-streams-redis is the Redis Store of the Temporal Stream runtime. The runtime itself, temporalio-streams, is in sdk-rust. A lang bridge builds the runtime with RedisStreamRuntime, which connects on its first call that needs Redis.

Connecting

Lang sends the options as a RedisStreamConfig, from crates/streams-redis/protos/temporal/sdk/streams/v1/redis.proto. Rust code can call RedisStore::connect with RedisStoreOptions. The Store needs Redis 7.0 or later. The table lists the main config fields. RedisStoreOptions has the same ones, except that topology: Topology replaces urls and cluster, and wait: Option<WaitOptions> replaces the two wait_ fields.

Option Default Use
urls One redis:// or rediss:// URL, or the seeds of a cluster
cluster false Set for a Redis Cluster
key_prefix temporal-streams The prefix of every key
retention 7 days The Retention of a Stream whose create sets none
safety_ttl 90 days How long an open Workflow-owned Stream stays after its last write
wait_replicas 0 The replicas that must have each write, with WAIT
wait_timeout 1 s How long a write waits for its replicas

The URL sets the credentials and TLS. crates/streams-redis/docs/redis.md has the key layout, the TTLs, the ACLs and the known limits.

Building

  • temporalio-streams isn't on crates.io yet, so run scripts/patch-sdk-rust.sh before you build.
  • A bridge that builds sdk-rust from its sdk-core submodule patches temporalio-common and temporalio-streams to those copies in [patch.crates-io], so that each type exists once.
  • A FIPS build uses default-features = false and the fips feature. The default feature links ring.

Testing

cargo test runs the cases that need no server. The cases that need Redis are #[ignore]. To run them, start the servers with crates/streams-redis/scripts/redis-test-servers.sh, set the two URLs that it prints, and run cargo test -- --include-ignored.

License

MIT. See LICENSE.txt.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages