Exclusive & Auto-Delete Queues — Concept Check
Questions on Exclusive & Auto-Delete Queues. Exclusive queues are accessible by a single connection and deleted when it closes; auto-delete queues are deleted when the last consumer unsubscribes — ideal for temporary reply queues.
Questions in this quiz
8 questions on Exclusive & Auto-Delete Queues — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A developer creates an exclusive queue for an RPC client. What happens to this queue when the client disconnects?
- AThe queue remains until the server restarts.
- BThe queue persists until manually deleted.
- CThe queue is automatically deleted.
- DThe queue is converted to a non-exclusive queue.
2.A subscriber connects to a fanout exchange with an auto-delete queue. What occurs when the subscriber disconnects?
- AThe queue and its messages are deleted.
- BThe queue is converted to a durable queue.
- CThe queue remains until the server restarts.
- DThe queue persists but messages are deleted.
3.Why might an exclusive, auto-delete queue be used for a session-based application?
- AIt ensures the queue is private and cleans up automatically.
- BIt allows multiple connections to access the queue.
- CIt persists messages across sessions.
- DIt prevents any messages from being lost.
4.A developer believes an auto-delete queue will be deleted if no consumers ever subscribe. What is the reality?
- AThe queue is deleted when manually purged.
- BThe queue is deleted immediately after creation.
- CThe queue is deleted when the server restarts.
- DThe queue is not deleted until it has had at least one consumer.
5.What happens if a connection declares an exclusive queue and then opens a second connection to access it?
- AThe second connection cannot access the queue.
- BThe queue is deleted immediately.
- CThe second connection can access the queue.
- DThe queue becomes non-exclusive.
6.A developer uses an auto-delete queue for a live-feed application but notices the queue isn't deleted after disconnecting. What might be the reason?
- AThe queue is incorrectly configured as durable.
- BThe server is configured to retain queues.
- CThe queue is exclusive, not auto-delete.
- DThe queue never had a consumer.
7.In a fanout exchange, why is an auto-delete queue preferred for subscribers?
- AIt allows multiple subscribers to share the queue.
- BIt prevents message loss during disconnections.
- CIt ensures messages are stored permanently.
- DIt cleans up automatically when subscribers disconnect.
8.What is a key difference between exclusive and auto-delete queues?
- AExclusive queues require manual deletion; auto-delete do not.
- BExclusive queues are always durable; auto-delete are not.
- CAuto-delete queues are private; exclusive are not.
- DExclusive ties to a connection; auto-delete ties to consumers.