I want return ack when the workflow is finished successfully.
But ,RabbitMQ trigger always auto return ack whatever you set in option “Delete From Queue When”, what setting I missing? or this is a bug?
MyTest Workflow
RabbitMQ trigger → Wait (60s)
or
RabbitMQ trigger → Wait (60s) → RabbitMQ(Delete From Queue)
but RabbitMQ server always receive ack immediately
Information on your n8n setup
- n8n version: Version 1.86.1
- Database (default: SQLite): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: linux
I think we looked at this same issue sometime back and found this stackoverflow question/answer outside the context of n8n, but it probably applies to how n8n works too. There is a suggested workaround in the stackoverflow thread, but I can’t remember whether one of my co-workers tried that in n8n, or what the outcome was. If you try it, please post back whether it helped you do what you want.
More insight on what ack means and how RabbitMQ uses it relative to delete in the RabbitMQ documentation here.
- The ack, iirc, tells RabbitMQ the message was received successfully and if the queue itself is configured for auto-delete, RabbitMQ interprets that to mean it is now ok to delete the message itself.
- If the queue is not set for auto-delete, the
delete when
option controls when n8n explicitly deletes the message.
- There is another option on the n8n trigger named “auto-delete” that tells n8n how things are set up on rabbitMQ so it can behave accordingly. It defaults to “off.”
- off means: n8n needs to handle deleting the message at some point.
- on means: n8n does not need to handle deleting the message (but will still send
ack
as usual).