public AzureServiceBusMessagePump(
            Func <TransportMessage, IEndpoint, Task> handleMessageFunc,
            IEndpoint endpoint,
            AzureServiceBusMetaDataMapper metaMapper    = null,
            AzureServiceBusMessagePumpSettings settings = null,
            IAzureServiceBusRecoverabilityProvider recoverabilityProvider = null
            )
        {
            _endpoint          = endpoint;
            _handleMessageFunc = handleMessageFunc;
            _metaDataMapper    = metaMapper ?? new AzureServiceBusMetaDataMapper();
            _recoverability    = recoverabilityProvider != null ? recoverabilityProvider : new AzureServiceBusDeferRecoverabilityProvider();

            if (settings != null)
            {
                _maxConcurrentHandlers       = settings.MaxConcurrentHandlers > 0 ? settings.MaxConcurrentHandlers : _maxConcurrentHandlers;
                _maxCompletionImmediateRetry = settings.MaxCompletionImmediateRetry > 0 ? settings.MaxCompletionImmediateRetry : _maxCompletionImmediateRetry;
            }
            _completeImmediateRetryPolicy = Policy
                                            .Handle <Exception>()
                                            .RetryAsync(_maxCompletionImmediateRetry);
        }
 public AzureServiceBusTransport(TransportSettings settings)
 {
     _settings       = settings;
     _metaDataMapper = new AzureServiceBusMetaDataMapper();
 }