public RabbitMQTarget() { var container = new Container(x => { x.AddRegistry <LoggingRegistry>(); x.AddRegistry <CommonRegistry>(); }); var configService = container.GetInstance <IConfigurationService>(); var rabbitConfig = configService.Get <RabbitConfiguration>(); _rabbitMqHostHostConfig = rabbitConfig.LoggingHost; }
public RabbitMqBus(RabbitHost host) { var rabbitHost = host; _factory = new ConnectionFactory() { HostName = rabbitHost.Uri, UserName = rabbitHost.Username, Password = rabbitHost.Password }; _connection = _factory.CreateConnection(); _channel = _connection.CreateModel(); _handlers = new List <Tuple <string, Func <IModel, EventingBasicConsumer> > >(); }