DLQ routing drops messages

17 views
Skip to first unread message

Vilius Šumskas

unread,
Oct 1, 2025, 4:57:10 AM (6 days ago) Oct 1
to rabbitm...@googlegroups.com

Hi,

 

we are trying to setup dead lettering on RabbitMQ where main queue sends unprocessed messages to DLQ and then DLQ resends these messages back to original queue after 10 seconds. We successfully did this by consulting https://docs.spring.io/spring-cloud-stream/reference/rabbit/rabbit_overview/putting-it-all-together.html which creates this RabbitMQ configuration: https://p.defau.lt/?KVQGXs_SoMH_QY1nlnJqUA

 

Now we want to improve configuration, by changing x-dead-letter-exchange of the DLQ queue from "x-dead-letter-exchange": "" to "x-dead-letter-exchange": "telemetry-event-bus" to point to the same exchange we are using for original queue traffic https://p.defau.lt/?nSw0crOmXzX8UV0dR8PjZg .

 

For some reason this doesn‘t work. All messages are just dropped after DLQ TTL expires. Any ideas how to fix that?

 

--

   Best Regards,

 

    Vilius Šumskas

    Rivile

    IT manager

 

Michal Kuratczyk

unread,
Oct 1, 2025, 5:58:58 AM (6 days ago) Oct 1
to rabbitm...@googlegroups.com
Looks to me like a simple routing key mistake: the binding for the telemetry-event-bus exchange hass "api-raw-events" routing
key, but you don't set this value in x-dead-letter-routing-key.

Not directly related, but you probably want to take a look at https://www.rabbitmq.com/blog/2022/03/29/at-least-once-dead-lettering as well.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/rabbitmq-users/AM8PR01MB8134A402011461B847DF293392E6A%40AM8PR01MB8134.eurprd01.prod.exchangelabs.com.


--
Michal
RabbitMQ Team

Vilius Šumskas

unread,
Oct 1, 2025, 6:20:43 AM (6 days ago) Oct 1
to rabbitm...@googlegroups.com

Thank you. I have added “x-dead-letter-routing-key”: “api-raw-events” to the DLQ and now it works. I assume sending through default exchange in previous configuration worked because default exchange has a routing key of queue name (which we set in DLQ routing in original queue)?

 

Regarding “at-least-once” dead lettering, I have read that post but had hard time to apply for our use case. Are you saying that DLQ the way we have configured it could be… “unstable” in some cases, and we should implement “at-least-once” dead lettering?

 

--

    Vilius

Michal Kuratczyk

unread,
Oct 1, 2025, 6:48:27 AM (6 days ago) Oct 1
to rabbitm...@googlegroups.com
Yes, the default exchange has implicit bindings for all queues with the queue name as the routing key.

And yes, as the blog post explains, there are cases where the default dead-lettering may lose messages.
at-least-once dead-lettering is a safer option.



--
Michal
RabbitMQ Team
Reply all
Reply to author
Forward
0 new messages