Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡ Add acknowledge option for RabbitMQ #3272

Closed
wants to merge 2 commits into from

Conversation

tinti
Copy link

@tinti tinti commented May 10, 2022

Add the option to acknowledge or not acknowledge messages coming from
trigger node.

The current implementation reuses sendResponse logic from node
RespondToWebhook.

m2scared and others added 2 commits May 7, 2022 14:54
Add the option to acknowledge or not acknowledge messages coming from
some trigger services.

The current implementation reuses `sendResponse` logic from node
`RespondToWebhook`.
Add the option to acknowledge or not acknowledge messages coming from
trigger node.

The current implementation reuses `sendResponse` logic from node
`RespondToWebhook`.
@CLAassistant
Copy link

CLAassistant commented May 10, 2022

CLA assistant check
All committers have signed the CLA.

@tinti
Copy link
Author

tinti commented May 10, 2022

Hi @michael-radency, @nivb06, @Joffcom,

This PR references: #2646

My goal with this implementation is to allow one to control if a message will be acknowledged and removed from the queue or if it will be not acknowledged and put back to the queue. This can be reused in other message queue systems in the future.

Example:

Trigger -> if (Math.round(Math.random()) == 1) -> Ack
           else                                -> Nack

image

I am still not very confident with this solution. It does not work with manualTriggerFunction because the channel is closed before the message is acked. RabbitMQ requires a message to be acked or nacked at the same channel that it was pulled. At least it works fine with background processes.

Do you have any suggestions?

@n8n-assistant n8n-assistant bot added community Authored by a community member node/improvement New feature or request node/new Creation of an entirely new node labels May 10, 2022
@janober
Copy link
Member

janober commented Sep 4, 2022

Thanks a lot for your contribution but I am closing this PR as the same logic got in the meantime already implemented but a little bit different to not require an additional response node. If we want to add it via a special node in the future we can use this PR.

@janober janober closed this Sep 4, 2022
@tinti tinti deleted the feature/rabbitmq_acknowledge branch December 3, 2022 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Authored by a community member node/improvement New feature or request node/new Creation of an entirely new node
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants