QuizzesCompeting Consumers Pattern — Concept Check
intermediate
rabbitmq

Competing Consumers Pattern — Concept Check

Questions on Competing Consumers Pattern. Multiple consumer instances all subscribe to the same queue; the broker delivers each message to exactly one consumer, providing natural horizontal scaling for processing.

7 minutes 7 questions Pass at 70%
Time Limit
7 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

7 questions on Competing Consumers Pattern — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A worker in a RabbitMQ setup crashes before acknowledging a message. What happens to the message?

    • AIt is sent to a dead letter queue immediately.
    • BIt is re-delivered to another worker.
    • CIt waits indefinitely in the queue.
    • DIt is lost permanently.
  2. 2.You have a RabbitMQ setup with multiple consumers. Messages are being processed out of order, causing issues. What should you do?

    • AIncrease the prefetch count.
    • BAdd more consumers.
    • CDisable manual acknowledgements.
    • DUse a single consumer for strict ordering.
  3. 3.In a Competing Consumers pattern, what is the effect of setting `prefetch=1`?

    • AIncreases throughput by allowing more messages per consumer.
    • BLeads to message loss if a consumer crashes.
    • CCauses messages to be processed out of order.
    • DEnsures fair dispatch by limiting a consumer to one unacknowledged message.
  4. 4.A RabbitMQ worker processes an order but crashes before acknowledging it. The message is re-delivered and processed again. Why does this not cause issues?

    • AThe queue prevents duplicate messages.
    • BThe message is automatically acknowledged before processing.
    • CWorkers are designed to be idempotent.
    • DMessages are never re-delivered.
  5. 5.You notice that your RabbitMQ queue is growing rapidly. What is a potential solution to handle the increased load?

    • ASwitch to a single consumer model.
    • BDecrease the prefetch count to 0.
    • CDisable manual acknowledgements.
    • DScale up the number of worker replicas using Kubernetes.
  6. 6.How does KEDA help in managing RabbitMQ workloads?

    • AIt ensures message ordering across consumers.
    • BIt auto-scales deployments based on queue depth.
    • CIt disables manual acknowledgements for faster processing.
    • DIt increases the prefetch count dynamically.
  7. 7.What happens if a message is not acknowledged in a Competing Consumers setup?

    • AIt is processed by the same consumer again.
    • BIt is re-delivered to another consumer.
    • CIt is permanently deleted from the queue.
    • DIt is sent to a dead letter queue immediately.