-
Describe the bugWhen using no routing keys and transitioning from an at-most-once to an at-least-once dead-letter strategy with quorum queues a situation was observed where previously dead-letter items could get stuck in the internal dead-lettered bucket despite a valid route existing. Reproduction steps
{
"vhost": "/",
"name": "at-least-once-deadletter",
"pattern": "foo$",
"apply-to": "quorum_queues",
"definition": {
"dead-letter-strategy": "at-least-once",
"overflow": "reject-publish"
},
"priority": 1
}
Steps to resolve:
{
"vhost": "/",
"name": "at-least-once-deadletter",
"pattern": "foo$",
"apply-to": "quorum_queues",
"definition": {
"dead-letter-strategy": "at-least-once",
"overflow": "reject-publish",
"dead-letter-routing-key": "dlx"
},
"priority": 1
}
Expected behaviorThe items should have been routed after step 12 above as they should not have any routing key and there is no dead-letter-routing-key and the Additional contextUsing RabbitMQ 3.13.1 |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
The code lines which lead to a workaround was in rabbit_fifo_dlx_worker so perhaps the issue is the use of OriginalRoutingKeys when there are none? |
Beta Was this translation helpful? Give feedback.
-
@Lukazoid there were multiple dead-lettering-related changes since |
Beta Was this translation helpful? Give feedback.
-
I'm afraid I do not understand what is being bound to what. Can we please use names more sensible that "foo", and not name every single thing "foo" (an exchange, a policy, etc)? Even non-repeated single letter names are more descriptive. "Create this foo then that foo than bind it to this other foo which has a policy named foo" is not the kind of reproduction steps anyone wants to use. If the steps are specific, you are welcome to put together an executable test case using any client library you like. |
Beta Was this translation helpful? Give feedback.
-
@ansd is aware of this discussion but I'll mention him just in case. |
Beta Was this translation helpful? Give feedback.
-
Shovelling this message will change the message's exchange to the default exchange
Hence, there is no bug and at-least-once dead lettering works as expected. |
Beta Was this translation helpful? Give feedback.
-
Ah, shovelling changes the routing-key @ansd ? Maybe that's the part I was missing @michaelklishin it was meant to just be a trivial case to represent a 1-1 exchange-queue binding, sorry if it confused matters. |
Beta Was this translation helpful? Give feedback.
Shovelling this message will change the message's exchange to the default exchange
""
and the routing key tofoo
.Therefore, the following expected behaviour description is wrong:
Hence, there is no bug and at-least-once dead lettering works as expected.
In fact, this situation shows the strength of at-least-once dead lettering: Despite the misunderstanding and the resulting misconfiguration of the topology where sending to the dead letter exchange with no appropriate route would have resulted in the message being dropped with the default at-most-once…