0
votes

We are using azure web job for batch processing, the job will trigger when there is a message in the storage queue.

We have configured the job to execute the messages one by one.

JobHostConfiguration config = new JobHostConfiguration();
config.Queues.BatchSize = 1;
config.Queues.MaxDequeueCount = 1;

even though the job is taking multiple messages from the storage queue and executing parallelly.

Please help.

1

1 Answers

0
votes

taking multiple messages from the storage queue and executing parallelly

How did you judge take multiple messages and executing in parallel? Did you have multiple instances?

I test the code in different situations.

1)The normal situation ,not set the batchsize, it will drag all messages in the queue.However i think it still run one by one.But from the result i think it won't wait last running completely over.Here is result.

2)Set the batchsize to 1, if you debug the code or refresh the queue frequently, you will find it did drag one message one time run. And here is result.

3) Set the batchsize to three and debug , it just change the message number dragged, each time it will drag 3 messages, then it will run like normal without setting batchsize.Here is the result.And i found if you just run not debug , the order console showing is very orgnized.

So if you don't have other instance running, i think this is working in sequential mode. If this doesn't match your requirements or you still have questions, please let me know.