In attached model there is two processors and two queues. logic which I want from here is at queue 2 a batch of 50 reached from source 2 and one by one processor1 is processing from queue1 then in queue 3 a batch of 500 came from source 3 and processor2 must get 16 item from queue2 at once and process with one item coming from processor1.