AMQP 0-9-1 Model — Concept Check
Questions on AMQP 0-9-1 Model. AMQP defines exchanges (routing), queues (storage), and bindings (rules); publishers target exchanges, consumers subscribe to queues — the model decouples routing from storage.
Questions in this quiz
8 questions on AMQP 0-9-1 Model — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A producer sends a message to an exchange with no matching binding rules. What happens if the mandatory flag is set?
- AThe message is discarded silently.
- BThe message is stored in a default queue.
- CThe message is sent to all queues.
- DThe message is returned to the producer.
2.A service using RabbitMQ experiences slow message processing. You notice all threads share a single channel. What's the issue?
- AThe exchange type is incorrect, causing slow routing.
- BChannels are expensive, limiting throughput.
- CChannels are not thread-safe, causing contention.
- DMessages are not persistent, causing delays.
3.In AMQP, what role does a binding play in message routing?
- AIt connects exchanges to queues with rules.
- BIt stores messages temporarily.
- CIt multiplexes connections over TCP.
- DIt acts as a producer of messages.
4.A developer configures an exchange with type 'fanout'. What is the expected behavior?
- AMessages are discarded if no queue matches.
- BMessages are broadcast to all bound queues.
- CMessages are routed based on routing keys.
- DMessages are stored until consumed.
5.A consumer application crashes, and messages are lost. What might have been misconfigured?
- AMessages were not marked as persistent.
- BThe exchange was not durable.
- CThe queue was not durable.
- DAll of the above.
6.A team sets up multiple channels over a single TCP connection for their application. Why is this beneficial?
- AChannels are lightweight and reduce the overhead of multiple connections.
- BChannels ensure messages are always persistent.
- CChannels increase the security of message transmission.
- DChannels prevent message loss during broker restarts.
7.In RabbitMQ, what happens if a message is sent with a routing key that doesn't match any binding?
- AThe message is automatically routed to a default queue.
- BThe message is stored in the exchange temporarily.
- CThe message triggers an error in the producer.
- DThe message is discarded unless the mandatory flag is set.
8.A developer assumes that a durable queue guarantees message persistence. What else is needed for full durability?
- AMessages must also be marked as persistent.
- BThe exchange must be non-durable.
- CThe queue must be exclusive.
- DThe channel must be closed after sending.