0

enter image description here Why I got message which is set 10min ttl before the 20min ttl message which is sent early than the 10min ttl message?

I expect that get 20min message firstly, and then get 10min message secondly.

What's the meaning of the following content? enter image description here

cwww3
  • 11
  • 2

1 Answers1

0

Why I got message which is set 10min ttl before the 20min ttl message which is sent early than the 10min ttl message?

Because the message with the 10min ttl dies before the message with 20min ttl. So "10min ttl" message is the first one to go to the dlx and then to the dlq. "20min ttl" message will live for 10 more minutes and will end up in the dlq after.

What's the meaning of the following content?

Please, read the first paragraph of the docs in your screenshot more attentively. It is about setting the per-message TTL to a queue, which already has messages. It means, that some messages in this queue can be dead already. For example, a message in the middle of this queue. That's what is meant by "expired messages can queue up behind non-expired".

So now the question is, when will rabbit understand that this message is dead? Again lets go back to the first paragraph: "Only when expired messages reach the head of a queue will they actually be discarded (or dead-lettered)."

And just to repeat again - it's only about "Queues that had a per-message TTL applied to them retroactively (when they already had messages)"

Dmitrii Bocharov
  • 872
  • 6
  • 21