We are designing an application that handles tasks for different customers. The tasks are categorized by their type and by the customer they are for, and they are queued to be processed by a pool of workers.The tasks can be executed by any of the workers, but the processing of the tasks has to be sequential for a given type and a given customer: if a tasks of a certain category for a certain customer is being processed, no other tasks of the same type for that same customer should be processed until the first one is completed.What mechanism could be used to control this kind of execution order?
How to manage task execution order with the Competing Consumers architecture?
design patterns;architecture;producer consumer