Azure Service Bus Retry Policy doesn't change the behavior
<p>I'm trying to understand the retry policy on the Azure Service Bus but it's not working the way I would expect.  I have the following code that both listens for messages and sends a message to a specific azure queue.</p>

<pre><code>using System;
using Microsoft.ServiceBus;
using Microsoft.ServiceBus.Messaging;

namespace ServiceBusTester
{
    class Program
    {
        static void Main(string[] args)
        {
            var connectionString = "Endpoint=sb://&lt;NamespaceName&gt;.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=&lt;SharedAccessKey&gt;";
            var queueName = "MyTestQueue";

            var retryPolicy = new RetryExponential(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(30), 15);

            var ns = NamespaceManager.CreateFromConnectionString(connectionString);
            ns.Settings.RetryPolicy = retryPolicy;

            if (!ns.QueueExists(queueName))
                ns.CreateQueue(queueName);

            var mf = MessagingFactory.CreateFromConnectionString(connectionString);
            mf.RetryPolicy = retryPolicy;

            var mr = mf.CreateMessageReceiver(queueName);
            mr.RetryPolicy = retryPolicy;

            var retryCount = 0;

            mr.OnMessage(_ =&gt;
            {
                retryCount++;
                Console.WriteLine($"{retryCount.ToString().PadLeft(4, ' ')} - Message Received: {_.GetBody&lt;string&gt;()}");
                _.Abandon();
            }, new OnMessageOptions() { AutoComplete = true });


            var client = QueueClient.CreateFromConnectionString(connectionString, queueName);
            client.RetryPolicy = retryPolicy;

            var message = new BrokeredMessage("This is a test message!");

            client.Send(message);

            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
    }
}
</code></pre>

<p>Even though I'm specifying that the retry policy should retry 15 times, I'm still seeing it only retry the default 10 times.  I've even tried using the NoRetry policy, but it still retries 10 times.</p>

<p><a href="https://i.stack.imgur.com/3Npe4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Npe4.png" alt="Console output"></a></p>

<p>I also verified that the <code>Maximum Delivery Count</code> on the queue was set to an arbitrarily large number, but that didn't change anything:</p>

<p><a href="https://i.stack.imgur.com/2RNlS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2RNlS.png" alt="enter image description here"></a></p>

<p>I'm sure I've gone overboard with the assignment of the retry policy to the numerous different clients / factories, but I'm not sure what's wrong here.</p>