Spring Retry with RabbitMQ — Concept Check
Questions on Spring Retry with RabbitMQ. Configure a RetryInterceptorBuilder on the listener container to automatically retry failed messages with back-off before routing to a DLQ.
Questions in this quiz
8 questions on Spring Retry with RabbitMQ — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A RabbitMQ listener is configured with a RetryInterceptorBuilder using exponential back-off. If the initial interval is 1 second and the multiplier is 2, what will be the delay before the third retry attempt?
- A2 seconds
- B4 seconds
- C1 second
- D8 seconds
2.Your @RabbitListener method throws an exception, and you have configured maxAttempts to 3. What happens after the third attempt fails?
- AThe message is requeued indefinitely
- BThe message is sent to the DLQ
- CThe message is acknowledged
- DThe message is processed successfully
3.You notice that your RabbitMQ messages are being retried too frequently. Which configuration change can increase the time between retries?
- ADecrease the maxAttempts
- BIncrease the back-off multiplier
- CUse immediate requeue recoverer
- DSwitch to manual acknowledgment
4.A developer configures a RepublishMessageRecoverer for a RabbitMQ listener. What is the purpose of this configuration?
- ATo immediately requeue failed messages
- BTo acknowledge failed messages automatically
- CTo publish failed messages to an error exchange
- DTo prevent messages from reaching the DLQ
5.When using DLQ-based delayed retry with TTL queues, what happens to a message after its TTL expires in the wait queue?
- AIt is deleted permanently
- BIt is dead-lettered back to the processing queue
- CIt is sent to an error exchange
- DIt is requeued to the wait queue
6.A team configures fixed back-off retries for their RabbitMQ listener. What is a possible downside of this approach?
- AWastes time on non-transient errors
- BCauses infinite retry loops
- CIgnores DLQ routing
- DRequires manual acknowledgment
7.A developer mistakenly believes that setting maxAttempts to 1 will prevent retries. What actually happens with this configuration?
- AThe message is requeued
- BThe message is processed once and then sent to DLQ on failure
- CThe message is retried indefinitely
- DThe message is acknowledged automatically
8.What is the role of spring-retry in a RabbitMQ listener configuration?
- ATo manage manual acknowledgments
- BTo handle message conversion
- CTo configure message TTL
- DTo provide automatic retries for transient errors