AMQP Credentials with failover

Describe the problem/error/question

I am subscribing to an ActiveMQ cloud service with AMQP credentials.
The ActiveMQ service is failover, hence I have 2 hostnames with ports to subscribe to e.g.

How can I configure the AMQP credentials for both hosts?

Currently it’s only working if i hardcode either one of the 2 service hostnames

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @mcs,

Welcome to the community :cake:

We only support adding one hostname so you could work around this in the workflow and if there is an error use the other credentials (unless you are using a trigger node). I suspect this wouldn’t take too much effort to add although I would need to check the docs for the client we are using.

I take it with AMQ they prefer not to use a loadbalancer to direct the traffic to the currently active main node?

Hi @Jon

Thanks for the quick response.
I am actually using the trigger node to receive the events from ActiveMQ.

As far as I can tell it’s not really a loadbalancer. It’s more of a failover switch and either one of the 2 endpoints is up and running. Problem is I never know which one it is, as I am not really in control of the message broker.

I could setup separate credentials for both endpoints and have two trigger nodes.
But this would end up in one of them constantly logging connection refused errors.
Not sure if this is a good appoach :thinking:

1 Like