Deofol
Deofol

Reputation: 33

RabbitMQ Dead Lettter queue never persistent

Is there a way to ensure when you NACK a message and it gets sent to a dead letter exchange/queue that it will be persistent? It seems by default even if the original message is set as persistent with SetPersistent(true), the dead lettered message does not follow suite.

Upvotes: 2

Views: 693

Answers (1)

old_sound
old_sound

Reputation: 2313

RabbitMQ doesn't modify the properties of Dead Letter'ed messages, except for the expiration one: https://github.com/rabbitmq/rabbitmq-server/blob/master/src/rabbit_dead_letter.erl#L74

If the message was published with deliver_mode=2, then it should be published as persistent into the Dead Letter Queue

Upvotes: 2

Related Questions