23 releases
Uses new Rust 2024
| new 0.11.1 | Mar 4, 2026 |
|---|---|
| 0.11.0 | Mar 4, 2026 |
| 0.10.8 | Feb 23, 2026 |
| 0.9.20 | Feb 13, 2026 |
| 0.9.9 | Jan 31, 2026 |
#625 in Configuration
520 downloads per month
Used in 3 crates
63KB
1.5K
SLoC
rrq-config
Configuration loader and settings types for RRQ.
What is RRQ?
RRQ (Reliable Redis Queue) is a distributed job queue with a Rust orchestrator. This crate provides shared configuration parsing for the orchestrator, producer, and FFI bindings.
When to Use This Crate
Use rrq-config if you're:
- Building custom tooling that reads
rrq.toml - Extending the RRQ configuration format
- Embedding RRQ components with programmatic config
For most use cases, the configuration is loaded automatically by rrq, rrq-producer, etc.
Installation
[dependencies]
rrq-config = "0.9"
Usage
Load from file
use rrq_config::load_toml_settings;
let settings = load_toml_settings(Some("rrq.toml"))?;
println!("Redis: {}", settings.redis_dsn);
println!("Default runner: {:?}", settings.default_runner_name);
Load producer settings
use rrq_config::load_producer_settings;
let producer_settings = load_producer_settings(Some("rrq.toml"))?;
println!("Queue: {}", producer_settings.queue_name);
Default config path
use rrq_config::load_toml_settings;
// Looks for RRQ_CONFIG env var, then ./rrq.toml
let settings = load_toml_settings(None)?;
Configuration Format
[rrq]
redis_dsn = "redis://localhost:6379/0"
default_runner_name = "python"
default_job_timeout_seconds = 300
default_max_retries = 5
[rrq.runners.python]
type = "socket"
cmd = ["rrq-runner", "--settings", "myapp.runner:settings"]
tcp_port = 9000
pool_size = 4
max_in_flight = 10
[[rrq.cron_jobs]]
function_name = "cleanup"
schedule = "0 0 * * * *"
Related Crates
| Crate | Purpose |
|---|---|
rrq |
Orchestrator |
rrq-producer |
Job producer |
License
Apache-2.0
Dependencies
~3–4.5MB
~96K SLoC