Updated dead-letter-exchange.txt

AlexanderSemenets authored
revision f5742c28f7c2f00cc969acf6e37f1cb0f42b5c84
dead-letter-exchange
# Dead Letter Exchange

It is possible to form a cycle of message dead-lettering. For instance, this can happen when a queue dead-letters messages to the default exchange without specifiying a dead-letter routing key. Messages in such cycles (i.e. messages that reach the same queue twice) will be dropped if there was no rejections in the entire cycle.

Dead-lettering a message modifies its headers:

the exchange name is replaced with that of the latest dead-letter exchange,
the routing key may be replaced with that specified in a queue performing dead lettering,
if the above happens, the CC header will also be removed, and
the BCC header will be removed as per Sender-selected distribution.