Skip to content

Allow configuring redis queue prefixes #2056

@turip

Description

@turip

Feature Request

Motivation

When cohosting multiple services into the same redis, one way to isolate those services' keys is to use different prefixes and Redis ACLs.

Right now Svix has support to define custom prefixes for it's queues for integration tests (see here, comment here)

However in the redis db the queues would look like this when using the self-hosted version:
{queue}_svix_v3_main

Proposal

Introduce a new configuration/environment variable called SVIX_QUEUE_PREFIX. If this is set, then here:

pub async fn run(cfg: Configuration) {
    let _metrics = setup_metrics(&cfg);
    run_with_prefix(None, cfg, None).await
}

We would specify the actual prefix instead of None.

Alternatives

This proposal ensures that this is a backward compatible change.

If a breaking change is fine, most probably svix_v3_main should be the default queue name, and if SVIX_QUEUE_PREFIX is set only then the key should be PREFIX_svix_v3_main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions