arobson / rabbot

Deprecated: Please see https://github.com/Foo-Foo-MQ/foo-foo-mq
MIT License
277 stars 129 forks source link

reject dropping messages? #103

Closed djMax closed 7 years ago

djMax commented 7 years ago

I have 3 queues: main, main.retry and main.rejected. (I don't think retry matters for the problem I describe)

main has DLX of main.rejected main.retry has a DLX of main with a TTL of n seconds

A message comes in on main and I reject it. It correctly goes into main.rejected. THEN, I use the message shovel to put it BACK in main. The subscriber processes it again and rejects it again. At this point, the message just disappears. Why?

djMax commented 7 years ago

I don't quite understand it yet, but this seems likely to be the cause. The headers on initial delivery are:

    "fields": {
        "consumerTag": "Maxs-iMac.local.node.41159.test.q",
        "deliveryTag": 3,
        "redelivered": false,
        "exchange": "test",
        "routingKey": "testkey"
    },

After rejection and using shovel, they are like this:

    "fields": {
        "consumerTag": "Maxs-iMac.local.node.41159.test.q",
        "deliveryTag": 4,
        "redelivered": false,
        "exchange": "",
        "routingKey": "test.q"
    },

Rejecting that second message dumps it into the aether.

djMax commented 7 years ago

I now realize this is me misunderstanding shovels. The default one in the UI blows up the exchange and routingkey values, but I can create a dynamic shovel in the UI that does not. So, not a rabbot bug at all.