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

Amqp Trigger starts all Workflows with Amqp Trigger #1284

Closed
erbg opened this issue Dec 30, 2020 · 6 comments
Closed

Amqp Trigger starts all Workflows with Amqp Trigger #1284

erbg opened this issue Dec 30, 2020 · 6 comments

Comments

@erbg
Copy link
Contributor

erbg commented Dec 30, 2020

We have two different Workflows that listens on a AMQP Topic on different Subscriptions.
When we get a new Message in one of the Subscriptions both Workflows starts.

It seems as if the Trigger node shares the same instance of ITriggerFunctions.

Steps to reproduce the behavior:
Create 2 Workflows with a AMQP Trigger on different Subscriptions.
Launch a message on one Subscriptions
Both Workflows will start

Expected behavior
Just the Workflow with the Subscription Trigger should start.

@erbg
Copy link
Contributor Author

erbg commented Dec 30, 2020

@janober : Can you help me? I would like to implement an asyncron Delivery -> Accept message flow for AMQP - So that a message can be rejected if the n8n Workflow throws an error.

The RHEA on_message event passes a delivery Object on which you have an "Accept" or "Reject" method. Do you see any posibility to passa reference to this object in the Workflow so that we can create a second node for Accepting or Rejecting the message on the bus?

Thanks

@janober
Copy link
Member

janober commented Dec 30, 2020

No, sorry that is sadly not possible. Currently, n8n only supports passing around data as JSON, it is not build to handle objects.

@erbg
Copy link
Contributor Author

erbg commented Jan 1, 2021

I thought so, would it be possible to have a callback event when the workflow finishes or similar? In this case we could get the trigger and accept the message on the end of the workflow.

@atakchidi
Copy link

We have the exact same issue, almost all workflows are based on amqp so we are kinda struggling, for now I solved this by putting an "IF" node after each trigger that check fro proper message type

@janober
Copy link
Member

janober commented Jan 20, 2021

@erbg No sorry such a callback does currently not exist and we would have to think about properly how something like that should be implemented to be as useful for as many cases as possible.

@atakchidi The issue got fixed by @erbg. I did just check the PR, made some changes, and merged. Will be released with the next version.

@janober janober closed this as completed Jan 20, 2021
@janober
Copy link
Member

janober commented Jan 21, 2021

Fix got released with n8n@0.103.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants