public async static Task <AdvancedMessageProcessingWorker <T> > CreateAndStartAsync(IQueueConsumer consumer,
                                                                                            Action <T> callbackAction, CancellationToken cancellationToken,
                                                                                            ExceptionHandlingStrategy exceptionHandlingStrategy = ExceptionHandlingStrategy.Requeue,
                                                                                            int invokeRetryCount = 1, int invokeRetryWaitMilliseconds = 0)
        {
            var instance = new AdvancedMessageProcessingWorker <T>(consumer, callbackAction, exceptionHandlingStrategy,
                                                                   invokeRetryCount, invokeRetryWaitMilliseconds);

            await instance.StartAsync(cancellationToken).ConfigureAwait(false);

            return(instance);
        }
        public async static Task <AdvancedMessageProcessingWorker <T> > CreateAndStartAsync(IQueueClient queueClient,
                                                                                            string queueName, Action <T> callbackAction, CancellationToken cancellationToken,
                                                                                            ExceptionHandlingStrategy exceptionHandlingStrategy = ExceptionHandlingStrategy.Requeue,
                                                                                            int invokeRetryCount = 1, int invokeRetryWaitMilliseconds = 0,
                                                                                            ConsumerCountManager consumerCountManager = null, IMessageRejectionHandler messageRejectionHandler = null)
        {
            var instance = new AdvancedMessageProcessingWorker <T>(queueClient, queueName, callbackAction,
                                                                   exceptionHandlingStrategy, invokeRetryCount, invokeRetryWaitMilliseconds, consumerCountManager,
                                                                   messageRejectionHandler);

            await instance.StartAsync(cancellationToken).ConfigureAwait(false);

            return(instance);
        }