Hi,
I needed to implement distributed semaphore in one of the applications and I found
this rabbitmq blog which describes a way of how this can be implemented using rabbitmq.
But I am concerned regarding the fairness.
So, when we have multiple consumers bound to the same queue, rabbitmq dispatches messages to them in round-robin order. But does rabbitmq gurantee that when new consumers join a queue, then any existing consumers which had already been waiting for a message (or resource) (they are waiting because a resource/message is not yet available) will get the message first (whenever the resource/message becomes available) before any new consumers? In simpler terms, does rabbitmq take into account how long a consumer has been waiting to decide which consumer gets the next message?
Let me know if something is unclear in the question.
Thanks in advance.