Ejemplo n.º 1
0
 /// <summary>
 ///     Creates PullingConsumer
 /// </summary>
 /// <param name="options">The options</param>
 /// <param name="queue">The queue</param>
 /// <param name="channel">The channel</param>
 /// <param name="interceptor">The produce-consumer interceptor</param>
 public PullingConsumer(
     PullingConsumerOptions options,
     IQueue queue,
     IPersistentChannel channel,
     IProduceConsumeInterceptor interceptor
     )
 {
     this.queue       = queue;
     this.options     = options;
     this.channel     = channel;
     this.interceptor = interceptor;
 }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public IPullingConsumer <PullResult <T> > CreateConsumer <T>(IQueue queue, PullingConsumerOptions options)
        {
            var consumer = CreateConsumer(queue, options);

            return(new PullingConsumer <T>(consumer, messageSerializationStrategy));
        }
Ejemplo n.º 3
0
        /// <inheritdoc />
        public IPullingConsumer <PullResult <T> > CreatePullingConsumer <T>(IQueue queue, bool autoAck = true)
        {
            var options = new PullingConsumerOptions(autoAck, configuration.Timeout);

            return(pullingConsumerFactory.CreateConsumer <T>(queue, options));
        }
Ejemplo n.º 4
0
        /// <inheritdoc />
        public IPullingConsumer <PullResult> CreateConsumer(IQueue queue, PullingConsumerOptions options)
        {
            var channel = channelFactory.CreatePersistentChannel(new PersistentChannelOptions());

            return(new PullingConsumer(options, queue, channel, produceConsumeInterceptor));
        }