title: Azure WebJob Process Storage Queue Messages Serially
body: <p>We have a need to process messages from an Azure Storage Queue serially, one at a time.</p>
  
  <p>By default, the <code>JobHostConfiguration.Queues.BatchSize</code> is set to 16</p>
  
  <p><a href="https://github.com/Azure/azure-webjobs-sdk/blob/0581fb1610d56a597523fcea67733944efba9541/src/Microsoft.Azure.WebJobs.Host/JobHostQueuesConfiguration.cs#L15" rel="nofollow">https://github.com/Azure/azure-webjobs-sdk/blob/0581fb1610d56a597523fcea67733944efba9541/src/Microsoft.Azure.WebJobs.Host/JobHostQueuesConfiguration.cs#L15</a></p>
  
  <p>And those 16 messages the WebJob pulls off the queue will be processed in parallel. Instead, we need the WebJob to process the messages serially, one at a time.</p>
  
  <p>How can this be achieved?</p>
  
  <p>We are currently forced to set the <code>BatchSize</code> to 1, which is not ideal because it introduces a lot of spin up/down time around reading from the message queue.</p>
  
  <p>Clarification: We do not need to enforce first in first out, or guaranteed order processing, just one at a time processing.</p>