Create a queue, say queue_department1, with two working threads.
Edit root configuration, and set the build queue as queue_department1 (This step is necessary that, queue_department1 will still be used even administrator of root.department1 set build queue as inherit from parent).
For users of department1, assign them to groups with only queue_department1 authorized.
In this way, subtree under root.department1 are limited to only use queue_department1.