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

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

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

                x.Consumer(() => _consumer);
            });
        }
Beispiel #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);
            });
        }
Beispiel #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));
            });
        }