-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support redis
max_receives
config option
This adds a `max_receives` option to both Redis queue implementations. This is the first step in supporting deadletter queuing. `InternalPayload` type aliases have been added to represent Omniqueue items that track the current number of times a message has been received (`num_receives`). `num_receives` is incremented whenever an item is re-queued from the pending/processing queues until it hits `max_receives`, at which point the message is abandoned. Later we will support putting this in an optional deadletter queue. I originally tried adding a proper struct for `InternalPayload`, but I don't think that clarified anything and was less memory optimal, so the relevant logic has been captured in simple functions instead.
- Loading branch information
Showing
6 changed files
with
364 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.