Queue Declaration & Properties — Concept Check
Questions on Queue Declaration & Properties. Queues are declared with durable, exclusive, auto-delete, and argument flags; idempotent declaration ensures the queue exists before producers publish.
Questions in this quiz
8 questions on Queue Declaration & Properties — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A developer declares a queue in RabbitMQ with the same name but different parameters than an existing queue. What happens?
- AA channel-level error is returned
- BThe existing queue is deleted and recreated
- CThe existing queue is updated with new parameters
- DA new queue is created alongside the existing one
2.A queue is declared with the 'exclusive' flag in a shared RabbitMQ environment. What is the implication?
- AThe queue is deleted when the broker restarts
- BThe queue survives broker restarts
- CThe queue is shared among all connections
- DOnly the declaring connection can access the queue
3.In Spring AMQP, what happens if RabbitAdmin cannot connect to the broker at startup?
- AAuto-declaration is retried on reconnect
- BManual intervention is required to declare queues
- CThe application fails to start
- DQueues are declared once broker is available
4.A developer uses channel.queueDeclarePassive() for a queue that doesn't exist. What occurs?
- AThe method returns false
- BThe queue is created automatically
- CAn IOException is thrown
- DA warning is logged but no exception
5.What is the role of the 'durable' flag when declaring a queue in RabbitMQ?
- ADeletes the queue when the last consumer leaves
- BEnsures the queue survives broker restarts
- CMakes the queue private to the connection
- DSets a TTL for messages in the queue
6.A queue is declared with auto-delete enabled. What happens when the last consumer disconnects?
- AThe queue is deleted
- BThe queue is transferred to another consumer
- CThe queue is marked for deletion but not removed
- DThe queue remains until manually deleted
7.A service uses a queue with 'x-max-length' argument set to 50,000. What happens when this limit is reached?
- AOldest messages are discarded
- BMessages are redirected to DLX
- CNew messages are rejected
- DQueue stops accepting messages
8.In Spring AMQP, where are queue declarations typically placed?
- ADirectly in the main application class
- BIn a @Configuration class
- CIn a separate XML configuration file
- DIn the application.properties file