title: Receiving Azure service bus messages from multiple, dynamically queues with worker role
body: <p>I'm trying to solve a problem where multiple queues (i.e. one queue per month) is created on Azure Service Bus. The messages in the queue contains information about customer billings. The queues are created like this:</p>
  
  <pre><code>/// &lt;summary&gt;
  /// Creates a new queue on Azure Service Bus
  /// &lt;/summary&gt;
  /// &lt;param name="queueName"&gt;string&lt;/param&gt;
  /// &lt;returns&gt;string (name of created queue)&lt;/returns&gt;
  public string CreateNewQueue(string queueName)
  {
      try
      {
          NamespaceManager manager = NamespaceManager.Create();
  
          if (!manager.QueueExists(queueName))
          {
              manager.CreateQueue(queueName);
  
              return queueName;
          }
  
          return string.Empty;
      }
      catch (Exception e)
      {
          Logging.Instance.Fatal(e.ToString());
          return string.Empty;
      }
  }
  </code></pre>
  
  <p>After the queue is created, about 3.000 messages with billing-info (only database ids of the billings, though) are added to the queue.</p>
  
  <p>For processing the queues, I'd like to make use of the Azure Worker Role. I've created an Azure Service project and added a <code>Worker Role with Service Bus Queue</code> worker role to the project.</p>
  
  <p>Now, in the <code>Run()</code> method of the Worker Role, "only" a single queue is used (taken from sample code):</p>
  
  <pre><code>// The name of your queue
  const string QueueName = "ProcessingQueue";
  </code></pre>
  
  <p>I've got a feeling that I'm working against the norm here, by creating a new queue for each billing task :-) However, a new queue is certainly needed since it's critical to track each billing task every month.</p>
  
  <p>Is there any way to couple the Worker Role with the before mentioned dynamically created queues? </p>
  
  <p>Thanks in advance.</p>