RetryingĪ dead letter is automatically retried by this service, which means it is pushed a few times to the particular queue in which it failed before. unique ID for that message, containing the message ID and the queue it failed inĪs the message ID and the failing queue do not change when republishing a message, they can be used to identify a message in our database.Besides storing the message payload and all necessary metadata like the headers or the routing key, we also store a: This service basically just implements another consumer, listening to the dead-letters queue and storing all received dead letters in a MongoDB database. Dead Letter ServiceĪs mentioned in the last blog post, we wrote a simple script, which requeues the messages of the dead-letter queue, but because backend developers usually try to automate things, we wrote this new service to get rid of the script and the manual step. So we decided to improve that and write our own small service to deal with dead letters. Also, requeueing a dead letter in a specific queue is not possible in that interface. Since the RabbitMQ management interface is a very basic overview of some statistics about RabbitMQ, only showing the headers and the encoded payload of the queued dead letters without any ordering or grouping, it is pretty hard to get the information about which messages are currently in the dead letter queue. As some time has passed already, I am happy to announce that we actually improved handling that quite a bit. This post already gave insights in our current way of manually cleaning up that dead letter queue, and it contains some hints about a more sophisticated handling of dead letters. Most recently in this series, I have described how we handle dead letters with the dead letter exchange. In my previous posts about the message bus, I wrote about using RabbitMQ for decoupling our service s and how we defined our message content, followed by an explanation of how we keep our receivers fast and resilien t. Written by Martin Führlinger, Lead Engineer Backend Introduction
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |