I have an application that currently has the following setting:
- Replicated MySQL DB
- Distributed work queue
- Multiple Consumers / Consumer Work Queues
- One manufacturer that adds jobs to the queue (server bottom to bottom)
The setup looks something like this:

Manufacturer queries the database for new items that need to be added to the list of recurring jobs that need to be added to the work queue every N minutes. This job producer is the only node in my entire architecture that, if unsuccessful, will lead to the failure of the whole process. I can have a database server, a queue server, or several production servers, and the process will continue to work.
, ? , , , N . .
, 1/P , P - .
- :
itemsToBeProcess = db.FetchItems()
for (item in itemsToBeProcessed) {
if item.id % producerNumber == 0)
}
. , , , , 1/P, . , .
- - , ?