Closed nitinsinghit closed 3 years ago
Looks like https://github.com/squaremo/amqp.node only support one server address. If you are not using the CLOUDAMQP_URL
environment variable, you can set it like this
var amqp_url = 'amqp://admin:admin@172.26.1.2:5672/vhost_test';
// alternative if you still want to be able to use the environment variable
var amqp_url = process.env.CLOUDAMQP_URL || 'amqp://admin:admin@172.26.1.2:5672/vhost_test';
Looks like https://github.com/squaremo/amqp.node only support one server address. If you are not using the
CLOUDAMQP_URL
environment variable, you can set it like thisvar amqp_url = 'amqp://admin:admin@172.26.1.2:5672/vhost_test';
// alternative if you still want to be able to use the environment variable var amqp_url = process.env.CLOUDAMQP_URL || 'amqp://admin:admin@172.26.1.2:5672/vhost_test';
You mean only support single node not cluster?
You can still use a cluster with multiple nodes, just that the client will only connect to one of the nodes.
You can still use a cluster with multiple nodes, just that the client will only connect to one of the nodes.
How the connection string looks for multiple nodes? and on failure of one of the node does this library retries to connect to new master?
There's no connection string for multiple nodes. I don't think it does, you can search the issues or ask at https://github.com/squaremo/amqp.node
I am trying var amqp_url = process.env.CLOUDAMQP_URL || ["amqp://admin:admin@172.26.1.2:5672/vhost_test","amqp://admin:admin@172.26.1.2:5672/vhost_test","amqp://user:pass@172.26.2.1:5672/vhost_test"];