QuizzesDirect Exchange — Concept Check
intermediate
rabbitmq

Direct Exchange — Concept Check

Questions on Direct Exchange. Routes messages to queues whose binding key exactly matches the message's routing key; ideal for simple unicast routing such as task dispatch.

8 minutes 8 questions Pass at 70%
Time Limit
8 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

8 questions on Direct Exchange — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A message is sent with a routing key 'email' to a direct exchange. Which queue will receive it?

    • AAll queues bound to the exchange
    • BNo queue will receive it
    • CA queue bound with the routing key 'email'
    • DA queue bound with the routing key 'sms'
  2. 2.A developer binds two queues to a direct exchange with the same routing key. What happens when a message is sent with this key?

    • AThe message is delivered to neither queue
    • BThe message is delivered to one queue randomly
    • CThe message is delivered to both queues
    • DThe message is delivered to the first bound queue
  3. 3.You have a queue bound to a direct exchange with the routing key 'task'. What happens if a message with routing key 'job' is sent?

    • AThe message is delivered to a default queue
    • BThe message is delivered to all queues
    • CThe message is not delivered to the queue
    • DThe message is delivered to the queue
  4. 4.A message is sent to the default exchange with the routing key 'order-processor'. Which queue receives it?

    • AAll queues bound to the default exchange
    • BA random queue receives it
    • CNo queue receives it
    • DThe queue named 'order-processor'
  5. 5.In a worker pool pattern using a direct exchange, what happens if the prefetch count is too high?

    • ASlow consumers receive more messages
    • BMessages are evenly distributed
    • CFast consumers may hoard messages
    • DMessages are processed by all workers
  6. 6.A direct exchange is configured for task dispatch. What is its primary advantage?

    • ABroadcasting to all queues
    • BTransforming message content
    • CStoring messages temporarily
    • DEfficient unicast routing
  7. 7.When using the default exchange, what must the routing key match to deliver a message?

    • AThe message content
    • BAny binding key
    • CThe queue name
    • DThe exchange name
  8. 8.What happens when a message is sent to a direct exchange with no matching binding key?

    • AThe message is sent to a default queue
    • BThe message is discarded
    • CThe message is delivered to all queues
    • DThe message is stored for later