public void Stop()
        {
            DALRabbitMQ dalRabbitMQ = _DALRabbitMQ;

            if (dalRabbitMQ != null)
            {
                _DALRabbitMQ = null;
                dalRabbitMQ.Dispose();
                dalRabbitMQ = null;
            }
        }
 protected virtual void CheckRabbitMQ()
 {
     if (_DALRabbitMQ == null)
     {
         lock (this)
         {
             if (_DALRabbitMQ == null)
             {
                 _DALRabbitMQ = new DALRabbitMQ(ServiceConfiguration.RabbitMQConnections);
                 if (_Subscriptions.Count > 0)
                 {
                     lock (_Subscriptions)
                     {
                         foreach (Subscription item in _Subscriptions)
                         {
                             _DALRabbitMQ.Subscribe(item.QueueName, item.Durable, item.Temporary, item.RoutingKey, item.Handler);
                         }
                     }
                 }
             }
         }
     }
 }