Hi there,
i am trying to setup consul for service configuration and failover.
In my current test case I have 2 services that consume messages from a Rabbitmq queue aprocess them and write to a db.
Each of these runs on seperate server in the cluster. I want only 1 of them to work at a time but when 1 is down (check failure) the other to autmatically start. The service when healthy never stops only remains idle if Rabbit is empty.
My checks run on 10s intervals.
Could you provide me an example on how blocking queries can be implemented to start the second service.
I have read the guides but i cannot implement the leader election along with the session locks described in the guides.
I need to create a script for doing so or modify the consumers' (services) code?
Thank you,
Dimitris