Suppose a web API is called with some regular frequency throughout the day, 20x an hour. The actions that begin after the API is called are long running and can go for minutes each.
I need to process the tasks in order grouped in a certain way. E.G. The company these requests come from need to be queued in order, but ones from other companies may be run in parallel in their own group at the same time.
Instead of using a queue and a loop thread, can I have a dictionary that's of GroupId, Task and just append a new task with ContinueWith every time a request comes in for that group?
I've tested it out with about a request per 10 milliseconds for 10k requests. It ran fine, but I wanted some opinions with any experience or ideas on how this could work in a production environment.