internal MessageBusConnection(string connectionName) { Require.IsNotEmpty("connectionName", connectionName); _configElm = MessageBusConfigurationSection.Instance.Connections[connectionName]; if (_configElm == null) throw new ConfigurationErrorsException(String.Concat("Messagebus connection not configured: ", connectionName, ".")); _connection = _configElm.CreateConnection(); _connection.ConnectionShutdown += new ConnectionShutdownEventHandler(_connection_ConnectionShutdown); _connection.CallbackException += new CallbackExceptionEventHandler(_connection_CallbackException); }
internal QueueListener(AmqpConnectionConfigurationElement config, string exchange, string queue, string topic) { Require.IsNotNull("config", config); Require.IsNotNull("exchange", exchange); Require.IsNotNull("queue", queue); _config = config; this.Exchange = exchange; this.Queue = queue; this.Topic = topic ?? String.Empty; }