public Consumer CreateAsync() { var channel = _connection.ChannelFactory.CreateInputChannel(_connection.ChannelName, _connection.RoutingKey, _connection.IsDurable, highAvailability: _connection.HighAvailability); var messagePump = new MessagePumpAsync <TRequest>(_commandProcessor, _messageMapperRegistry.Get <TRequest>()) { Channel = channel, TimeoutInMilliseconds = _connection.TimeoutInMiliseconds, RequeueCount = _connection.RequeueCount, RequeueDelayInMilliseconds = _connection.RequeueDelayInMilliseconds, UnacceptableMessageLimit = _connection.UnacceptableMessageLimit }; return(new Consumer(_consumerName, _connection.Name, channel, messagePump)); }
private Consumer CreateAsync() { var channel = _subscription.ChannelFactory.CreateChannel(_subscription); var messagePump = new MessagePumpAsync <TRequest>(_commandProcessor, _messageMapperRegistry.Get <TRequest>()) { Channel = channel, TimeoutInMilliseconds = _subscription.TimeoutInMiliseconds, RequeueCount = _subscription.RequeueCount, RequeueDelayInMilliseconds = _subscription.RequeueDelayInMilliseconds, UnacceptableMessageLimit = _subscription.UnacceptableMessageLimit }; return(new Consumer(_consumerName, _subscription.Name, channel, messagePump, true)); }