I have tasks with an ids, and each task has some amount of jobs to do:
- every job for each user;
- for each task, number of users and jobs are different.
And I want to put all the jobs to one queue with name task{id}, so I can control when the task is done (by empty queue task{id}), and automatically delete it with rabbitMQ help, and control a number of consumers working on one task{id}.
And I want my consumers works all the time like daemons and choose the queues with jobs automatically to work with.
The main question here is how to get name of a task inside a consumers to bind them to it? Or maybe there can be some another trick with rabbitMQ to do so, without knowing name of a queue?