/// <summary> /// Constructs and returns a <see cref="IModel" /> representing a channel used to communicate with the broker /// </summary> /// <returns>a <see cref="IModel" /> representing a channel used to communicate with the broker</returns> public IModel CreateChannel() { lock (_lock) { return(ConnectionFactory.CreateConnection().CreateModel()); } }
private void AttachToConnectionEvents() { if (_connectionFactory != null) { _connectionFactory.CreateConnection().ConnectionShutdown += OnConnectionShutdown; _connectionFactory.CreateConnection().CallbackException += OnCallbackException; } }