Skip to content

How best to implement distributed semaphores? #116

Description

@gRoberts84

I'm currently trying to find the best way of structuring my project and I'm currently using Rabbit.js to pub/sub a queue to pass jobs between processes.

We have a process that hosts a web application which allows our users to initiate a process. Upon clicking "Go", the process parameters are inserted into the database and then a message is queued.

Now it gets complicated... We have a process that is clustered, which listens to the queue and initiates a connection to a data stream. As each stream is unique, we only want to initiate it once and if that stream dies for any reason, a message is automatically replaced in the queue until it is removed or expires.

Something similar to: https://www.rabbitmq.com/blog/2014/02/19/distributed-semaphores-with-rabbitmq/

Using Rabbit.js, is it possible to implement this?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions