Queues, Streams, Eventing
RabbitMQ exchanges: multiple-choice review
Six questions that cut across the whole unit. Each one mirrors a topology decision you make in a real design review — not a definition to recite, but a routing tradeoff to weigh under production load.
Confirm you can connect exchange type, binding keys, the smart-broker push model, and the production failure modes — the synthesis the lesson built toward.
You must deliver order events to three services today, expect more later, and one service only cares about EU orders. Which exchange type fits, and why?
A new consumer's queue receives nothing — no errors, no exceptions, and the producer's publish calls all return success. What is the most likely cause?
A topic binding uses the key order.*.eu. Which routing key matches?
A teammate says RabbitMQ and Kafka are interchangeable queues, so a late-joining consumer can replay last week's events from either. Where is the error?
One consumer holds a huge backlog of unacked messages while fast consumers sit idle, and broker memory keeps climbing toward the high-watermark. What is misconfigured, and what is the fix?
A consumer nacks-with-requeue on a malformed payload it can never process, and one worker is now pinned redelivering the same message forever. What is the durable fix?
The through-line is one routing decision tree: exchange type is the algorithm (direct exact-match, fanout broadcast, topic dotted-pattern with * and #, headers attribute-match), bindings plus routing keys decide which queues get an independent copy, and the smart-broker push model means an acked message is deleted — no replay, unlike Kafka. The production failures all sit one layer down: an unbound exchange drops silently unless you set mandatory or a catch-all binding, a too-high prefetch starves fast consumers and grows unacked memory, and a poison message with no dead-letter exchange loops forever. Get the exchange type and bindings right first; everything downstream depends on routing being correct.