コード例 #1
0
        public static IConnection OpenRabbitMqConnection(RabbitMqServerConfiguration rabbitMqServerConfiguration)
        {
            var factory = new ConnectionFactory {
                HostName = rabbitMqServerConfiguration.HostName
            };

            return(factory.CreateConnection());
        }
コード例 #2
0
 public RemoteMessageBus(RabbitMqServerConfiguration rabbitMqServerConfiguration)
 {
     _connection = OpenRabbitMqConnection(rabbitMqServerConfiguration);
     _channel    = _connection.CreateModel();
 }