Skip to content

Conversation

@Soroushsrd
Copy link

Problem

The Redis fallback implementation has an issue where message timeout tracking is based on a message's creation time rather than when it was last received. This results in:

  • Messages possibly being re-queued too soon
  • Duplicate processing of messages
  • Inconsistent ack deadlines

Solution

This PR fixes the issue by:

  1. Breaking down the atomic BRPOPLPUSH operation into separate BRPOP and LPUSH operations
  2. Generating a new ID with the current timestamp when moving messages to the processing queue
  3. Ensuring the ack deadline is measured from when a message is received, not created

Fixes #102

@Soroushsrd Soroushsrd requested a review from a team as a code owner May 9, 2025 00:08
@Soroushsrd Soroushsrd force-pushed the bug_redis_fallback branch from 4987aa5 to 447e183 Compare May 9, 2025 09:24
@Soroushsrd
Copy link
Author

Fixed the linting issue and amended the earlier commit

@svix-jplatte
Copy link
Member

Hey, looks like tests are failing with your change. You can test yourself by running sudo docker compose -f testing-docker-compose.yml up (with -d if you want it to keep running in the background), then cargo test redis_fallback.

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

Labels

None yet

2 participants