Пример #1
0
        public Consumer Create()
        {
            var messagePump = new MessagePump <TRequest>(commandProcessor, messageMapperRegistry.Get <TRequest>())
            {
                Channel = connection.Channel,
                TimeoutInMilliseconds = connection.TimeoutInMiliseconds,
                Logger = logger
            };
            var consumer = new Consumer(connection.Name, connection.Channel, messagePump);

            return(consumer);
        }
Пример #2
0
        public Consumer Create()
        {
            var channel     = _connection.ChannelFactory.CreateInputChannel(_connection.ChannelName, _connection.RoutingKey, _connection.IsDurable);
            var messagePump = new MessagePump <TRequest>(_commandProcessor, _messageMapperRegistry.Get <TRequest>())
            {
                Channel = channel,
                TimeoutInMilliseconds      = _connection.TimeoutInMiliseconds,
                RequeueCount               = _connection.RequeueCount,
                RequeueDelayInMilliseconds = _connection.RequeueDelayInMilliseconds,
                UnacceptableMessageLimit   = _connection.UnacceptableMessageLimit
            };

            return(new Consumer(_connection.Name, channel, messagePump));
        }
Пример #3
0
        public Consumer Create()
        {
            var channel = _connection.ChannelFactory.CreateInputChannel(_connection.ChannelName, _connection.RoutingKey, _connection.IsDurable);

            if (channel.SupportsCaching())
            {
                channel.SetCachedMessageCount(_connection.NoOfPeformers);
            }
            var messagePump = new MessagePump <TRequest>(_commandProcessor, _messageMapperRegistry.Get <TRequest>())
            {
                Channel = channel,
                TimeoutInMilliseconds      = _connection.TimeoutInMiliseconds,
                RequeueCount               = _connection.RequeueCount,
                RequeueDelayInMilliseconds = _connection.RequeueDelayInMilliseconds,
                UnacceptableMessageLimit   = _connection.UnacceptableMessageLimit,
                Logger = _logger
            };

            var consumer = new Consumer(_connection.Name, channel, messagePump);

            return(consumer);
        }