title: Azure service bus - message going straight to dead letter queue
body: <p>I have the following code to send messages to the bus:</p>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>var queueClient = new QueueClient(ServiceBusConnectionString, QueueName);
  
  var message = new Message(poco.SerializeToBytes());
  
  await queueClient.SendAsync(message);
  </code></pre>
  
  <p>But they seem to be going straight into the DEAD-LETTER MESSAGE COUNT:</p>
  
  <p><a href="https://i.stack.imgur.com/YZmc6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YZmc6.png" alt="enter image description here"></a></p>
  
  <p>I have also created an Azure function which will pick messages up:</p>
  
  <pre class="lang-cs prettyprint-override"><code>    [FunctionName("ServiceBusFunction")]
      public static void Run([ServiceBusTrigger("schedule", AccessRights.Listen, Connection = "ServiceBusConnection")]byte[] myQueueItem, TraceWriter log)
      {
          log.Info($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
      }
  </code></pre>
  
  <p>When I turn the function off, the messages were go into the ACTIVE MESSAGE COUNT before I created this function. I've tried running the function locally and the function was not being hit. I feel like I'm missing something fundamental in terms of picking up messages on the bus from a function?</p>