title: Azure WebJob concurrency when using ServiceBusTrigger
body: <p>I have been using Azure Storage Queues to feed a WebJob, using the <code>QueueTrigger</code> attribute. I configure my <code>QueueTrigger</code> to dequeue a number of items for concurrent processing, like this:</p>
  
  <pre><code>public static void Main()
  {
      JobHostConfiguration config = new JobHostConfiguration();
      config.NameResolver = new QueueNameResolver();
  
      config.Queues.NewBatchThreshold = 10;
  
      JobHost host = new JobHost(config);
      host.RunAndBlock();
  }
  
  public static void ExecuteStorageQueueItem([QueueTrigger("%AzureQueueName%")] CloudQueueMessage message, TextWriter logger)
  {
      ProcessRequest(message.AsString, logger);
  }
  </code></pre>
  
  <p>I would prefer to use Service Bus. Does the <code>MaxConcurrentCalls</code> parameter on <code>ServiceBusConfiguration</code> allow for the same automatic parallel execution? For example:</p>
  
  <pre><code>public static void Main()
  {
  
      JobHostConfiguration config = new JobHostConfiguration();
      config.NameResolver = new QueueNameResolver();
  
      ServiceBusConfiguration serviceBusConfig = new ServiceBusConfiguration();
      serviceBusConfig.MessageOptions.MaxConcurrentCalls = 10;
      config.UseServiceBus(serviceBusConfig);
  
      JobHost host = new JobHost(config);
      host.RunAndBlock();
  }
  
  public static void ExecuteServiceBusItem([ServiceBusTrigger("%ServiceBusQueueName%")] BrokeredMessage message, TextWriter logger)
  {
      ProcessRequest(message.GetBody&lt;string&gt;(), logger);            
  }
  </code></pre>
  
  <p>I'm not sure whether <code>MaxConcurrentCalls</code> does what I think it does!</p>