Bird
0
0

Which Spring Boot annotation is commonly used to listen to messages including those routed to a Dead Letter Queue?

easy📝 Conceptual Q2 of 15
Spring Boot - Messaging
Which Spring Boot annotation is commonly used to listen to messages including those routed to a Dead Letter Queue?
A@MessageMapping
B@RabbitListener
C@KafkaListener
D@QueueListener
Step-by-Step Solution
Solution:
  1. Step 1: Identify Spring Boot messaging annotations

    @RabbitListener is the standard annotation for RabbitMQ message listeners in Spring Boot.
  2. Step 2: Match annotation to DLQ listening

    DLQ messages are consumed like normal messages, so @RabbitListener applies; others are unrelated or incorrect.
  3. Final Answer:

    @RabbitListener -> Option B
  4. Quick Check:

    Listener annotation = @RabbitListener [OK]
Quick Trick: Use @RabbitListener to consume messages including DLQ ones [OK]
Common Mistakes:
  • Confusing Kafka and RabbitMQ annotations
  • Using non-existent @QueueListener
  • Mixing @MessageMapping with messaging listeners

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes