So I have multiple producers who generate some tasks
and there is consumer (or multiple) who executes these tasks (f.e. count number of lines in a file)
My problem is that consumers should be treated evenly, meaning if one producer generate 10 tasks and other only 2 - consumer should first do 1 task from producer1, then task from producer2, then producer1 and then the rest
Basically for each producer system must guaranty that created tasks will not wait for large chunk of tasks from other producers
Can you help me with algorithm or ready to use broker/queue software that can achieve this goal ?
question from:
https://stackoverflow.com/questions/65868240/queue-that-that-serves-producers-evenly 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…