Exemple #1
0
        public IDisposable StartConsuming()
        {
            internalConsumer = internalConsumerFactory.CreateConsumer();

            internalConsumer.Cancelled += consumer => Dispose();

            var status = internalConsumer.StartConsuming(
                connection,
                queue,
                onMessage,
                configuration
                );

            if (status == StartConsumingStatus.Succeed)
            {
                eventBus.Publish(new StartConsumingSucceededEvent(this, queue));
            }
            else
            {
                eventBus.Publish(new StartConsumingFailedEvent(this, queue));
            }

            consumerCancellation = new ConsumerCancellation(Dispose);
            return(consumerCancellation);
        }
        public void StartConsuming()
        {
            internalConsumer = internalConsumerFactory.CreateConsumer();

            internalConsumer.Cancelled += consumer => OnRemoveMeFromList();

            internalConsumer.StartConsuming(
                connection,
                queue,
                onMessage);
        }
        public void StartConsuming()
        {
            internalConsumer = internalConsumerFactory.CreateConsumer();

            internalConsumer.Cancelled += consumer => OnRemoveMeFromList();

            internalConsumer.StartConsuming(
                connection,
                queue,
                onMessage);
        }
Exemple #4
0
        public IDisposable StartConsuming()
        {
            internalConsumer = internalConsumerFactory.CreateConsumer();

            internalConsumer.Cancelled += consumer => Dispose();

            internalConsumer.StartConsuming(
                connection,
                queue,
                onMessage);

            return(new ConsumerCancellation(Dispose));
        }
        public IDisposable StartConsuming()
        {
            internalConsumer = internalConsumerFactory.CreateConsumer();

            internalConsumer.Cancelled += consumer => Dispose();

            internalConsumer.StartConsuming(
                connection,
                queue,
                onMessage);

            return new ConsumerCancellation(Dispose);
        }
        public void StartConsuming()
        {
            internalConsumer = internalConsumerFactory.CreateConsumer();

            internalConsumer.Cancelled += consumer => OnRemoveMeFromList();

            internalConsumer.AckOrNackWasSent += context =>
                {
                    OnRemoveMeFromList();
                    Dispose();
                };

            internalConsumer.StartConsuming(
                connection,
                queue,
                onMessage);
        }
        public void StartConsuming()
        {
            internalConsumer = internalConsumerFactory.CreateConsumer();

            internalConsumer.Cancelled += consumer => OnRemoveMeFromList();

            internalConsumer.AckOrNackWasSent += context =>
            {
                OnRemoveMeFromList();
                Dispose();
            };

            internalConsumer.StartConsuming(
                connection,
                queue,
                onMessage);
        }
Exemple #8
0
        /// <inheritdoc />
        public void StartConsuming()
        {
            internalConsumer = internalConsumerFactory.CreateConsumer();

            internalConsumer.Cancelled += consumer => Dispose();

            var status = internalConsumer.StartConsuming(
                queue,
                onMessage,
                configuration
                );

            if (status == StartConsumingStatus.Succeed)
            {
                eventBus.Publish(new StartConsumingSucceededEvent(this, queue));
            }
            else
            {
                eventBus.Publish(new StartConsumingFailedEvent(this, queue));
            }
        }