I have implemented a long running process as a WebJob which is triggered upon a queue message. My understanding is that JobHost.RunAndBlock()
would only start executing once the current job has completed and returned. However, if my first process is still running when another queue message arrives, a second process starts executing and trashes the first process (which has some static data structures).
JobHost.RunAndBlock not blocking
1.6k views Asked by phil At
1
By default, queue messages are processed in parallel. The default degree of parallelism is 16.
If you don't want parallel execution, you can set the
JobHostConfiguration.Queues.BatchSize
to1
, as described here.