From the course: Learning RabbitMQ: Efficient Message Queuing

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Working with dead letter exchanges

Working with dead letter exchanges

- [Instructor] Most mature messaging systems have a way of dealing with messages that go nowhere. These are called dead letters. In RabbitMQ, messages can become dead letters when one of the following occurs, the message is rejected or negatively acknowledged by the consumer and the consumer tells RabbitMQ not to requeue the message, the message expires due to time-to-live option specified on the queue or on the message, or the queue exceeds a length limit. Such dead letter messages are published to a dead letter exchange. This is a regular exchange that you can specify when declaring the queue. RabbitMQ will also add some extra headers to the message, allowing you to identify where it came from and why and when it was dead-lettered. Each time a message is dead-lettered, a new entry is prepended to the values of the x-death header. Each entry will contain key-value pairs that provide information about the queue the…

Contents