cecid / hermes

Hermes Messaging Gateway
BSD 2-Clause "Simplified" License
21 stars 17 forks source link

supporting setting up corvus on two or multiple nodes #11

Open Harendra1974 opened 4 years ago

Harendra1974 commented 4 years ago

as I understands, corvus supports running only on one node. running Corvus on multiple nodes (they all point to same database) causes to fail messages since each node corvus back end processes tries to process same message multiple time and fails. could you please how this can be supported in Corvus.

i did following to support, but it supports only 2 nodes. I am fine with this for now. this approach force to run outbox and Inbox processes in one node (master). only this node goes down, the other node takes the process and becomes the master. introduced a table to store current master (where Inbox and OutBox task are runing) node IP. if master is down, after defined delay time, other node becomes master.