/// <summary>
        /// 
        /// </summary>
        /// <param name="address"></param>
        /// <param name="tryProcessMessage"></param>
        public void Start(Address address, Action<BrokeredMessage> tryProcessMessage)
        {
            _cancelRequested = false;

            _tryProcessMessage = tryProcessMessage;

            _subscriptionClient = SubscriptionClientCreator.Create(address, EventType);

            if (_subscriptionClient != null) _subscriptionClient.BeginReceiveBatch(BatchSize, TimeSpan.FromSeconds(ServerWaitTime), OnMessage, null);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="address"></param>
        /// <param name="tryProcessMessage"></param>
        public void Start(Address address, Action <BrokeredMessage> tryProcessMessage)
        {
            _cancelRequested = false;

            _tryProcessMessage = tryProcessMessage;

            _subscriptionClient = SubscriptionClientCreator.Create(address, EventType);

            if (_subscriptionClient != null)
            {
                _subscriptionClient.BeginReceiveBatch(BatchSize, TimeSpan.FromSeconds(ServerWaitTime), OnMessage, null);
            }
        }
        private void OnMessage(IAsyncResult ar)
        {
            try
            {
                var receivedMessages = _subscriptionClient.EndReceiveBatch(ar);

                if (_cancelRequested)
                {
                    return;
                }

                foreach (var receivedMessage in receivedMessages)
                {
                    _tryProcessMessage(receivedMessage);
                }
            }
            catch (MessagingEntityDisabledException)
            {
                if (_cancelRequested)
                {
                    return;
                }

                Thread.Sleep(TimeSpan.FromSeconds(BackoffTimeInSeconds));
            }
            catch (ServerBusyException)
            {
                if (_cancelRequested)
                {
                    return;
                }

                Thread.Sleep(TimeSpan.FromSeconds(BackoffTimeInSeconds));
            }

            _subscriptionClient.BeginReceiveBatch(BatchSize, TimeSpan.FromSeconds(ServerWaitTime), OnMessage, null);
        }