Skip to content

bridge: add dlq_config to redis queue plugin - #2705

Open
stackedbyaradhya wants to merge 2 commits into
svix:mainfrom
stackedbyaradhya:feat/redis-dlq-config
Open

stackedbyaradhya wants to merge 2 commits into
svix:mainfrom
stackedbyaradhya:feat/redis-dlq-config

Conversation

@stackedbyaradhya

Copy link
Copy Markdown
Contributor

Fixes #2704

Motivation

omniqueue's RedisConfig supports a dlq_config (a queue_key + a
max_receives count -- after that many receives, a message is moved to
the dead letter queue instead of being redelivered), but the bridge's
RedisInputOpts always passed dlq_config: None, so there was no way to
configure one.

Solution

Adds a DeadLetterQueueConfig wrapper (needed since omniqueue's own
type doesn't implement Deserialize, following the same wrapper
pattern already used for RabbitMQ's
BasicConsumeOptions/BasicPublishOptions in this crate) and wires it
through in consumer(). Left producer() untouched, matching how it
already zeroes out the other consumer-only fields -- a DLQ only makes
sense for the receiving side.

Added a config-deserialization test (default and explicit value), and
a documented example in svix-bridge.example.senders.yaml. Verified the
test fails without the field wired up, and that the existing redis
integration suite still passes unchanged.

@stackedbyaradhya
stackedbyaradhya requested a review from a team October 14, 2026 11:39
@stackedbyaradhya
stackedbyaradhya requested a review from a team as a code owner October 14, 2026 11:39

@svix-jplatte svix-jplatte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I have one minor comment, but otherwise looks good to me.

Comment thread bridge/svix-bridge-plugin-queue/src/redis/mod.rs Outdated
svix-jbrown
svix-jbrown previously approved these changes Oct 16, 2026
omniqueue's RedisConfig supports a dlq_config (a queue_key + a
max_receives count -- after that many receives, a message is moved to
the dead letter queue instead of being redelivered), but the bridge's
RedisInputOpts always passed dlq_config: None, so there was no way to
configure one.

Adds a DeadLetterQueueConfig wrapper (needed since omniqueue's own type
doesn't implement Deserialize, following the same wrapper pattern
already used for RabbitMQ's BasicConsumeOptions/BasicPublishOptions in
this crate) and wires it through in consumer(). Left producer()
untouched, matching how it already zeroes out the other consumer-only
fields -- a DLQ only makes sense for the receiving side.

Added a config-deserialization test (default and explicit value), and
a doc'd example in svix-bridge.example.senders.yaml. Verified the test
fails without the field wired up, and that the existing redis
integration suite still passes unchanged.
jplatte noted serde already treats a missing Option field as None without
an explicit #[serde(default)], making the attribute on dlq_config
redundant. jbrown's counter (preferring it for explicitness) was dismissed,
so removing it per jplatte's original suggestion.
@stackedbyaradhya

Copy link
Copy Markdown
Contributor Author

Any update on this @svix-jplatte @svix-jbrown !?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dead letter queue support to the Redis queue plugin

3 participants