educative.io

What is the data structure suggested to store the messages in a queue for inmemory of brokers?

how are segments part of it? I’m not able to visualize any data structure for that. Could you please give more details about the in-memory storage of messages and how consumer manager stores their order and offset details?


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: https://www.educative.io/courses/grokking-modern-system-design-interview-for-engineers-managers/gkoZOY1yDKr

Hi Phanindra.

The queue of a broker is a list-like structure storing messages based on their offset. These messages may be objects, numbers, strings, or any other data type, depending on the application of the pub-sub system. In this case, an object may be used to store the content and offset details of a message.

I hope that clears up the confusion. If you have any further questions, feel free to reach out to us.

Thank you.