[package] name = "pgtrickle-relay" version = "0.29.0" edition = "2024" description = "Bidirectional relay CLI for pg_trickle stream tables — bridges outboxes/inboxes with NATS, Kafka, HTTP webhooks, Redis, SQS, RabbitMQ, and more" license = "Apache-2.0" repository = "https://github.com/grove/pg-trickle" readme = "README.md" keywords = ["postgresql", "streaming", "relay", "kafka", "nats"] categories = ["database", "command-line-utilities"] [[bin]] name = "pgtrickle-relay" path = "src/main.rs" [features] # Default: the most common forward sinks + stdout (no cmake build required) default = ["nats", "webhook", "stdout"] # Optional backends (each adds a Cargo dependency) nats = ["dep:async-nats"] webhook = ["dep:reqwest"] kafka = ["dep:rdkafka"] stdout = [] redis = ["dep:redis"] sqs = ["dep:aws-sdk-sqs", "dep:aws-config"] pg-inbox = [] # no extra deps — uses tokio-postgres already rabbitmq = ["dep:lapin"] [dependencies] # Core async runtime + CLI clap = { version = "4", features = ["derive", "env"] } tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal", "time", "sync", "io-util", "fs", "io-std"] } tokio-postgres = { version = "0.7", features = ["with-serde_json-1", "with-uuid-1", "with-chrono-0_4"] } # Serialisation serde = { version = "1", features = ["derive"] } serde_json = "1" toml = "1.1" # Error handling + logging thiserror = "2" async-trait = "0.1" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } # Utilities chrono = { version = "0.4", features = ["serde"] } uuid = { version = "1", features = ["v4", "serde"] } futures-util = "0.3" # Metrics + health (always required — axum powers the /metrics and /health endpoints) axum = "0.8" prometheus = "0.14" # Optional sink/source backends async-nats = { version = "0.47", optional = true } reqwest = { version = "0.12", features = ["rustls-tls", "json"], default-features = false, optional = true } rdkafka = { version = "0.37", optional = true } redis = { version = "0.28", features = ["tokio-comp", "streams"], optional = true } aws-sdk-sqs = { version = "1.98", optional = true } aws-config = { version = "1.8", optional = true } lapin = { version = "2", optional = true } [dev-dependencies] testcontainers = "0.27" testcontainers-modules = { version = "0.15", features = ["postgres", "redis", "rabbitmq"] } tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "sync"] } tokio-postgres = { version = "0.7", features = ["with-serde_json-1", "with-uuid-1", "with-chrono-0_4"] } tempfile = "3"