Skip to content

Commit f34922b

Browse files
committed
feat: allow specifying queue prefix
This allows to colocate more services inside the same redis cluster and isolate them using ACLs.
1 parent edd8260 commit f34922b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

server/svix-server/src/cfg.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ pub struct ConfigurationInner {
185185
/// The DSN for the Redis-backed queue. Overrides `redis_dsn`. (can be left empty if not using
186186
/// redis)
187187
pub queue_dsn: Option<String>,
188+
/// The prefix to use for the queue. If not provided it will be empty.
189+
pub queue_prefix: Option<String>,
188190

189191
/// What kind of cache to use. Supported: memory, redis (must have redis_dsn or cache_dsn
190192
/// configured), none.

server/svix-server/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async fn graceful_shutdown_handler() {
101101

102102
pub async fn run(cfg: Configuration) {
103103
let _metrics = setup_metrics(&cfg);
104-
run_with_prefix(None, cfg, None).await
104+
run_with_prefix(cfg.queue_prefix.clone(), cfg, None).await
105105
}
106106

107107
#[derive(Clone)]

0 commit comments

Comments
 (0)