Feature request: Add message priorities to Redis queues
Open
enhancement
redis
- Dominant language
- Python
- Stars
- 5.3k
- Forks
- 383
- Avg merge
- 9h 41m
- Merged PRs (30d)
- 2
Description
I think it would be interesting to add queues with priority functionality. In the sense that you could add a message with a specific priority score, and consumers would always consume in order. This would be easy to implement on redis using a sorted set. Operations would take O(ln(N)) instead of O(1), but it is still very acceptable for many cases.
A simpler version of this feature would be having the option to add a given message on the front of the queue (simply using lpush instead of rpush).
We can use the message_id string to store information so that the message is consistently added on requeues.
What do you think?
Contributor guide
Assessment
This issue has not been assessed yet.