title: Azure Service Bus Nothing Happens When I Send Message
body: <p>I have set up an Azure Service Bus and a class using Microsoft's Azure Service Bus documentation as a template.  When I try running my code nothing happens.  No messages are sent to the service bus. I tried breaking it with incorrect queue name and connection string and didn't even get an error.  I am new to Async programming so maybe I am not properly implementing my tasks.</p>
  <blockquote>
  <pre><code>    public static async Task SendMessageAsync(string messageToSend)
      {
          // create a sender Bus Client
          ServiceBusClient client = new ServiceBusClient(connectionString);
          
          // create a sender for the queue.
          ServiceBusSender sender = client.CreateSender(queueName);
  
          // create a message that we can send. 
          ServiceBusMessage message = new ServiceBusMessage(messageToSend);
  
          // send the message
          await sender.SendMessageAsync(message);
          Console.WriteLine($&quot;Sent a single message to the queue: {queueName}&quot;);
  
          await client.DisposeAsync();            
      }
  </code></pre>
  </blockquote>
  <p>Calling this method here:</p>
  <pre><code>    private void ProcessPerformanceContributionFeed(string[] args, string batchRunId)
      {
          
          var task1 = Task.Run(async() =&gt;  await AzureServiceBusHelper.SendMessageAsync($&quot;Performance Contribution Started at {DateTime.Now.ToString()}&quot;));
  </code></pre>
  <p>The tasks runs (I think?) without any errors or any messages being sent to the Service Bus.</p>