Пример #1
0
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            configurator.Turnout <ProcessFile>(_busFactoryConfigurator, x =>
            {
                x.SuperviseInterval = TimeSpan.FromSeconds(1);
                x.SetJobFactory(async context => await Task.Delay(context.Message.Size));
            });
        }
Пример #2
0
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            configurator.Turnout<ProcessFile>(_busFactoryConfigurator, x =>
            {
                x.SuperviseInterval = TimeSpan.FromSeconds(1);
                x.SetJobFactory(async context => await Task.Delay(context.Message.Size));
            });
        }
Пример #3
0
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            configurator.Turnout<ProcessFile>(_busFactoryConfigurator, x =>
            {
                x.SuperviseInterval = TimeSpan.FromSeconds(1);
                x.SetJobFactory(async context =>
                {
                    await Console.Out.WriteLineAsync($"Started: {context.Message.Filename}");

                    await Task.Delay(context.Message.Size);

                    await Console.Out.WriteLineAsync($"Stopped: {context.Message.Filename}");
                });
            });
        }
Пример #4
0
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            configurator.Turnout <ProcessFile>(_busFactoryConfigurator, x =>
            {
                x.SuperviseInterval = TimeSpan.FromSeconds(1);
                x.SetJobFactory(async context =>
                {
                    await Console.Out.WriteLineAsync($"Started: {context.Message.Filename}");

                    await Task.Delay(context.Message.Size);

                    await Console.Out.WriteLineAsync($"Stopped: {context.Message.Filename}");
                });
            });
        }