I am currently trying to find a solution for implementing a specific type of queue that requires the following features:
- The entire queue must comply with the order of adding tasks.
- The entire queue will have a concurrency of 1, which means that only one task will be executed at a time per queue , and not a worker.
- There will be more than a thousand lines.
- It must be distributed and scalable (for example, if I add a worker)
Basically, this is one FIFO process queue, and this is exactly what I want when I test other message queuing software, such as ActiveMQ or RabbitMQ, but as soon as I scale it to 2 workers, it just doesn't work, because this case I want it to scale and support the same feature of a single process queue. Below I will attach a description of how it should work in a distributed environment with several workers.
An example of what the topology looks like: (Note that this is a many-many relationship between Queue and Workers )

An example of how it will work:
+------+-----------------+-----------------+-----------------+ | Step | Worker 1 | Worker 2 | Worker 3 | +------+-----------------+-----------------+-----------------+ | 1 | Fetch Q/1/Job/1 | Fetch Q/2/Job/1 | Waiting | +------+-----------------+-----------------+-----------------+ | 2 | Running | Running | Waiting | +------+-----------------+-----------------+-----------------+ | 3 | Running | Done Q/2/Job/1 | Fetch Q/2/Job/2 | +------+-----------------+-----------------+-----------------+ | 4 | Done Q/1/Job/1 | Fetch Q/1/Job/2 | Running | +------+-----------------+-----------------+-----------------+ | 5 | Waiting | Running | Running | +------+-----------------+-----------------+-----------------+
This is probably not the best view, but it shows that even in Queue 1 and Queue 2 there are more tasks, but Worker 3 does not begin to receive the next task until the end of the previous one.
This is what I am trying my best to find a good solution.
I tried many other solutions, such as rabbitMQ, activeMQ, apollo ... They allow me to create thousands of queues, but all of them, as I try, will use worker 3 to start the next job in the queue. And concurrency per worker
Is there any solution that can make this possible on any MQ platform like ActiveMQ, RabbitMQ, ZeroMQ, etc.?
Thank:)
queue amazon-sqs redis message-queue
DucDigital Feb 01 '17 at 12:08 on 2017-02-01 12:08
source share