Esempio n. 1
0
        protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            configurator.Batch <PingMessage>(x =>
            {
                x.MessageLimit = 2;

                x.Consumer <TestBatchConsumer, PingMessage>(_provider);
            });
        }
Esempio n. 2
0
        protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            _consumer = new TestBatchConsumer(GetTask <Batch <PingMessage> >());

            configurator.Batch <PingMessage>(x =>
            {
                x.MessageLimit = 100;

                x.Consumer(() => _consumer);
            });
        }
Esempio n. 3
0
        protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            _consumer = new TestBatchConsumer(GetTask <Batch <PingMessage> >());

            configurator.Batch <PingMessage>(x =>
            {
                x.MessageLimit = 2;
                x.TimeLimit    = TimeSpan.FromMilliseconds(500);

                x.Consumer(() => _consumer);
            });
        }
Esempio n. 4
0
        protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            _completed = GetTask <int>();

            configurator.Batch <DoWork>(x =>
            {
                x.MessageLimit = 100;
                x.TimeLimit    = TimeSpan.FromMilliseconds(50);

                x.Consumer(() => new DoWorkConsumer(_alreadyReceivedMessages, _duplicateMessages, _completed));
            });
        }