larry.gooroo at gmail.com
Fri Jun 6 05:44:46 BST 2014
Hi, been tinkering with RabbitMQ to solve a number of issues with
distributed servers, mostly the tutorials/docs have given me the
information needed but I have a special use case that I can't unravel.
In the simplest of the usages I have a queue called 'online' the message is
either 'On' or 'Off' to indicate whether servers should be online or
offline. The number of servers is variable depending on load (eg we are
planning to use AWS for some of our sites) So there is always one and only
one message persistently in the queue which indicates whether the server
should be handling user web requests. So I need the value to be sticky,
when a new server joins the queue it gets the last message and then is
'subscribed' and will receive the state change.
My idea is that when everything is online I could just run a cron job which
will ask the queue if it is on/off if off it will stop the web service (I
already do this manually with a semaphore file) and wait for the message to
'clear' back to 'online'. So how do I set up the sender and server side to
do this sort of semaphore? I assume the consumer side will just be similar
to what I have already being playing with on my local system here working
through the tutorials.
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss