rrq-config 0.10.2

RRQ configuration loader and settings types.
Documentation

rrq-config

Crates.io Documentation License

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_socket = "127.0.0.1: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