hardDesignConceptMidSeniorStaff
What is the difference between a queue and a log, and what does a broker mean when it claims exactly-once?
6 min readUpdated 2026-08-15
Answer
Short answer
A queue distributes work and forgets each message once acknowledged; a log is a retained, partitioned, replayable record that many consumers read independently at their own offsets.
Was this answer helpful?
Likely follow-ups
- Your consumer writes to a payments API that has no idempotency key. How do you avoid double charges?
- You need strict per-customer ordering but one customer produces 60% of the volume. Now what?
- What does consumer lag tell you that error rate does not, and what do you do when it grows linearly?
- A poison message blocks a partition. What are the options and what does each cost you?
Related questions
- Design a notification system that sends 50 million messages a day across email, SMS and push.hardAlso on idempotency and message-queues5 min
- An Android app queues actions while offline. After the process is killed and restarted, some actions sync twice and the user sees duplicate orders. How do you design the fix?hardAlso on idempotency4 min
- How do you design the tools an agent calls?hardAlso on idempotency5 min
- How do you turn a training script that works on your laptop into a scheduled pipeline?mediumAlso on idempotency5 min