Skip to main content

Crate camel_component_redis

Crate camel_component_redis 

Source
Expand description

Redis component for rust-camel.

Provides producer and consumer implementations for Redis, supporting:

  • String, Hash, List, Set, Sorted Set operations
  • Pub/Sub (SUBSCRIBE, PSUBSCRIBE, PUBLISH)
  • Queue operations (BLPOP, BRPOP)
  • Key management (EXPIRE, TTL, DEL, etc.)

§Breaking Changes in v0.10.0

  • RedisConsumer::new() now takes RedisEndpointConfig directly instead of separate (config, mode) parameters. The mode is inferred from the command type in the config (SUBSCRIBE/PSUBSCRIBE → PubSub, BLPOP/BRPOP → Queue).
  • resolve_zstore_keys() signature changed to accept &[String] instead of a single &str for ZUNIONSTORE/ZINTERSTORE key resolution.
  • Invalid consumer commands (e.g. SET, GET) now return an error instead of silently falling back to BLPOP (REDIS-003).

§Example

use camel_component_redis::{RedisComponent, RedisEndpointConfig};

let config = RedisEndpointConfig::from_uri("redis://localhost:6379?command=GET").unwrap();
let component = RedisComponent::new();

Re-exports§

pub use bundle::RedisBundle;
pub use config::RedisCommand;
pub use config::RedisConfig;
pub use config::RedisEndpointConfig;
pub use consumer::RedisConsumer;
pub use health::RedisHealthCheck;
pub use producer::RedisProducer;

Modules§

bundle
commands
config
consumer
executor
health
producer

Structs§

RedisComponent
RedisEndpoint