title: Why do my messages always get delivered to Dead Letter Queue in Azure Service Bus?
body: <p><strong>C# .NetCore 2.2 - 
  Azure Service Bus 3.4.0</strong></p>
  
  <p>I have 3 queues in Azure Service Bus with same properties. While sending messages to these queues, the messages in one of the queues always get delivered to Dead letter queues, while other 2 queues receive active messages.</p>
  
  <p>I have tried playing with the properties - increase TTL, maximum delivery count etc. The properties of all 3 queues are same, the only difference is the name of the queues.</p>
  
  <p>I have used this tutorial - <a href="https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-get-started-with-queues" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-get-started-with-queues</a></p>
  
  <p><a href="https://i.stack.imgur.com/wbeeL.png" rel="nofollow noreferrer">queue properties image</a></p>
  
  <p>static async Task SendMessagesAsync(int numberOfMessagesToSend)
  {</p>
  
  <pre><code>try
  
  {
  
  
      for (var i = 0; i &lt; numberOfMessagesToSend; i++)
  
      {
  
          // Create a new message to send to the queue.
  
          string messageBody = $"Message {i}";
  
          var message = new Message(Encoding.UTF8.GetBytes(messageBody));
  
          Console.WriteLine($"Sending message: {messageBody}");
  
          // Send the message to the queue.
          await queueClient.SendAsync(message);
      }
  }
  catch (Exception exception)
  {
      Console.WriteLine($"{DateTime.Now} :: Exception: {exception.Message}");
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>How do I prevent messages from going to Dead Letter Queue? Why does it happen with only 1 queue, not the other 2?</strong></p>