In the first blog in this series, I explained the concept of message expiry, or message-TTL. Here I’ll look at dead message queues (DMQs), which assumes you have background knowledge on Solace endpoints and Solace persistent messaging.
A dead message queue, sometimes referred to as a dead letter queue, is an endpoint to store messages that have lost delivery eligibility in their original endpoint, and stores messages for special processing or delayed consumption.
You might be wondering how a message can lose delivery eligibility, especially when it is originally published as persistent. There are two ways messages can be deemed ineligible for delivery:
Note that messages will not be moved into a DMQ unless they are published with the flag ‘DMQ-Eligible’. Without this set, the messages will be deleted from the original queue when they lose delivery eligibility.
If you want messages that expire to go to a DMQ, you need:
If you want messages that reach the maximum redelivery count to go to a DMQ, you need:
A DMQ is useful for special processing when messages are unable to be consumed on their original endpoint. This could be for expedited processing of orders, or the DMQ consumer may process the message in a different way than the original consumer.
Take for example an order management system that must process orders in a timely manner. For orders that are not processed in the desired amount of time, they could be expired to a dead message queue for expedited processing.
Another good example is error handling: a message that can’t be consumed from the original queue is moved to a DMQ to be inspected and processed.
I hope I’ve helped you feel more comfortable with what DMQs are and how to use them. If you found this post useful, you might want to check out the message properties section of our docs, and our PubSub+ for Developers page for more information. If you have any questions about queues and topic endpoints, try posting them to the Solace Developer Community!How to disable TTL (Time to live) using solace-pubsubplus Python libraryLearn how to publish messages with TTL turned off.
I have worked at Solace as a Customer Support Engineer, and as a Global Training Professional. I help customers to migrate from a siloed, monolithic architecture to an Event Driven Architecture. Solace PubSub+ enables the movement of data in an asynchronous manner, allowing distributed applications to seamlessly connect over any protocol.[position] => [url] => https://solace.com/blog/author/leahrobert/ ) )