/// <summary> /// Creates the consumer. /// </summary> public void CreateBasicConsumer() { if (_rabbitWrapperType == RabbitWrapperType.Output) { return; } while (true) { try { _consumer = BasicConsumerFactory.CreateQueueConsumer(_connection.Channel, _connection.QueueName); break; } catch (Exception exception) { Logger.Error("Error Socket Rabbit (AlreadyClosedException), intentando reconectar", exception); Reconnect(); } } }