educative.io

After queue partitioning, how do we know which partition to retrieve the oldest message

This chapter mentioned that we can partition a long queue using consistent hashing or a key-value store. After partitioning, how do we know which partition/host holds the oldest message (the message that should be retrieved at the next message retrieve request)?


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Design of a Distributed Messaging Queue: Part 1 - Grokking Modern System Design Interview for Engineers & Managers

Hello @Jiao_Yu,
If you refer to the partition lesson, you will get a better understanding of how this is achieved, but as mentioned in the current lesson, every message has a sequence number we just need to access the messages through that. But for a detailed explanation, please refer to the partition lesson as it explains how shards work.
Hope this helps.