0
0
HLDsystem_design~5 mins

Message queue concept in HLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a message queue in system design?
A message queue is a system that stores messages sent between different parts of a software system. It helps components communicate by holding messages until the receiver is ready to process them.
Click to reveal answer
beginner
Why use a message queue instead of direct communication?
Message queues allow asynchronous communication, meaning the sender and receiver do not need to interact at the same time. This improves system reliability and scalability by decoupling components.
Click to reveal answer
intermediate
What does 'decoupling' mean in the context of message queues?
Decoupling means that the sender and receiver of messages operate independently. The sender just puts messages in the queue without waiting for the receiver to be ready, making the system more flexible.
Click to reveal answer
intermediate
Name two common message queue patterns.
1. Point-to-Point: One sender, one receiver. 2. Publish-Subscribe: One sender, multiple receivers subscribe to messages.
Click to reveal answer
intermediate
What is the role of a message broker in a message queue system?
A message broker manages the queue, storing messages and delivering them to receivers. It ensures messages are not lost and can handle retries if delivery fails.
Click to reveal answer
What is the main benefit of using a message queue?
ARemoves the need for any communication
BAllows asynchronous communication between components
CMakes components run faster synchronously
DEnsures all components run on the same server
In a publish-subscribe pattern, how many receivers can get the message?
AMultiple receivers subscribed to the topic
BOnly one receiver
CNo receivers
DExactly two receivers
What does a message broker do?
AStores and manages messages between sender and receiver
BSends messages directly without storing
CDeletes messages immediately after sending
DPrevents messages from being sent
Which of these is NOT a benefit of message queues?
ADecoupling system components
BImproving system scalability
CGuaranteeing instant message delivery
DAllowing asynchronous processing
What happens if the receiver is busy when a message is sent to the queue?
AThe message is lost
BThe system crashes
CThe sender retries sending immediately
DThe message waits in the queue until the receiver is ready
Explain how a message queue helps improve system reliability and scalability.
Think about how components work independently and messages wait safely.
You got /4 concepts.
    Describe the difference between point-to-point and publish-subscribe message queue patterns.
    Consider how many receivers get the message in each pattern.
    You got /4 concepts.