Restrict number of jobs in Queue

How can we restrict number of jobs to perform in multiple queues?
I have workflow with complexity to limit single and multiple threaded jobs in queue
Ex: I have four Queue’s like EmailQueue, BatchJobQueue & SingleThreadedQueue.
Now I need to restrict number of jobs to perform in queues like
EmailQueue = 10 jobs
BatchJobQueue=5 jobs
SingleThreadedQueue=1 job ony.

How can we achieve this using Hangfire?

I have a similar need, however I’ve gone down the route of restricting the number of jobs external to Hangfire.

My problem is checking how many jobs are in the queue or if the queue is empty.

When the queue is empty, I’ll dump another 10 (or whatever number) jobs into the queue and monitor.

I know Pro has a “batch” processing feature, but I can’t afford that. :stuck_out_tongue: