Bird
0
0

What will happen if a message is rejected in a Spring Boot RabbitMQ listener without a Dead Letter Queue configured and requeue is set to false?

medium📝 Predict Output Q5 of 15
Spring Boot - Messaging
What will happen if a message is rejected in a Spring Boot RabbitMQ listener without a Dead Letter Queue configured and requeue is set to false?
AMessage is discarded and lost
BMessage is sent to a default DLQ automatically
CMessage is requeued for retry
DListener throws an error and stops
Step-by-Step Solution
Solution:
  1. Step 1: Understand behavior without DLQ

    If no DLQ is configured and requeue is false, rejected messages have nowhere to go.
  2. Step 2: Determine message fate

    Such messages are discarded and lost, as no retry or DLQ routing occurs.
  3. Final Answer:

    Message is discarded and lost -> Option A
  4. Quick Check:

    No DLQ + no requeue = message lost [OK]
Quick Trick: No DLQ + requeue false means lost messages [OK]
Common Mistakes:
  • Assuming default DLQ exists
  • Expecting retries
  • Thinking listener stops

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes