Async & Message Queues — Series 2
Preview — 3 of 10 questions
A Kafka-style topic is split into multiple partitions for scalability. Producers send events for the same orderId to the topic. Why doesn't Kafka guarantee global ordering across the whole topic, and how is per-key ordering still achieved?
A payment-processing consumer reads from a queue that provides at-least-once delivery, meaning the same message might occasionally be delivered twice. How does making the consumer idempotent solve the problem this creates?
A service needs to update its own database and publish an event to a message broker as part of the same logical operation (e.g., save the order and notify shipping). Why is doing this naively (write to DB, then publish to the broker) risky, and what does the outbox pattern fix?
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.