Bird
Raised Fist0
HLDsystem_design~10 mins

Message delivery guarantees in HLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select the message delivery guarantee that ensures a message is delivered at least once.

HLD
delivery_guarantee = "[1]"
Drag options to blanks, or click blank then click option'
Aat-most-once
Bexactly-once
Cat-least-once
Dbest-effort
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'at-most-once' which may lose messages.
Confusing 'exactly-once' with 'at-least-once'.
2fill in blank
medium

Complete the code to select the message delivery guarantee that ensures a message is delivered no more than once.

HLD
delivery_guarantee = "[1]"
Drag options to blanks, or click blank then click option'
Abest-effort
Bat-least-once
Cexactly-once
Dat-most-once
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'at-least-once' which allows duplicates.
Confusing 'exactly-once' with 'at-most-once'.
3fill in blank
hard

Fix the error in the code to select the message delivery guarantee that ensures a message is delivered exactly once.

HLD
delivery_guarantee = "[1]"
Drag options to blanks, or click blank then click option'
Aexactly-once
Bbest-effort
Cat-most-once
Dat-least-once
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'at-least-once' which may cause duplicates.
Choosing 'at-most-once' which may lose messages.
4fill in blank
hard

Fill both blanks to complete the message delivery flow that ensures exactly-once delivery using acknowledgments and deduplication.

HLD
if message_received and not [1]:
    process_message()
    send_[2]()
Drag options to blanks, or click blank then click option'
Amessage_processed
Bmessage_ack
Cmessage_duplicate
Dmessage_retry
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'message_duplicate' instead of 'message_processed' for the check.
Sending 'message_retry' instead of acknowledgment.
5fill in blank
hard

Fill all three blanks to complete the code snippet that implements at-least-once delivery with retries and acknowledgment.

HLD
while not [1]:
    send_message()
    [2] = wait_for_[3]()
Drag options to blanks, or click blank then click option'
Aack_received
Cack
Dmessage
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'message' with 'ack' in the wait function.
Using inconsistent variable names for acknowledgment.