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

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

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

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