Postal: Use existing rabbitmq cluster

Created on 9 Oct 2018  路  9Comments  路  Source: postalhq/postal

Is there a way to ensure postal uses the existing rabbitmq cluster? As of now, one node of the cluster is used and when that goes down, postal can't use the other. Please advice.

enhancement

Most helpful comment

something like this #725 dunno what about documentation and tests, code looks simple

All 9 comments

When you say Postal can't use another node from the cluster, do you mean the node doesn't have the Postal queue on it or that Postal won't connect to a new node to use it?

@willpower232 Postal won't connect to a new node. We have a 2 node cluster and the node to which it is connected went down, Postal wasn't able to connect to the other node in the cluster. Is there a way to provide both the RabbitMQ nodes IP's to postal?

I'm afraid that doesn't look like an option right now. If you restart Postal with the new IP, that would resolve it in the meantime.

I'm not sure if RabbitMQ has a load balancing domain name to help you always connect to a working node. You could assign a domain name and change the domain name to point at whichever node is working but without testing, I'm not sure whether Postal would be able to get the new IP.

bunny gem used in Postal can accept list of rabbitmq nodes, and will automatically reconnect to another node if first chosen went down. So, we need small coding in lib/postal/rabbit_mq.rb and maybe in config.rb for make it work. I can do it if needed.

If you have the capacity, a pull request would be handy for someone I'm sure

something like this #725 dunno what about documentation and tests, code looks simple

I think that adding some explanations in https://github.com/atech/postal/blob/master/config/postal.example.yml should be ok.
Or maybe add support for hosts in the yml, and in the feature the host key to become deprecated and then removed.

@tonymadbrain, @alinalexandru and @willpower232,

How can I add multiple IPs for RabbitMQ at config/postal.yml?

Thank you so much.

@tonymadbrain, @alinalexandru and @willpower232,

How can I add multiple IPs for RabbitMQ at config/postal.yml?

Thank you so much.

At the moment you can use array in host key, like this:

rabbitmq:
  host:
    - 10.1.1.1
    - 10.1.1.2
    - 10.1.1.3
...
Was this page helpful?
0 / 5 - 0 ratings

Related issues

BlueHatbRit picture BlueHatbRit  路  3Comments

shravin picture shravin  路  5Comments

shinebayar-g picture shinebayar-g  路  3Comments

ro78 picture ro78  路  4Comments

destroyer998 picture destroyer998  路  5Comments