Exemplo n.º 1
1
 protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ReceiveEndpoint("input_queue_error", x =>
     {
         _errorHandler = Handled<PingMessage>(x);
     });
 }
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            configurator.ReceiveEndpoint("execute_testactivity", x =>
            {
                x.ExecuteActivityHost<TestActivity, TestArguments>(_compensateUri, h =>
                {
                    h.UseConsoleLog(async log => log.Context.ActivityName);

                    h.Arguments(a => a.UseConsoleLog(async log => log.Context.Arguments.Value));

                    h.RoutingSlip(rs => rs.UseConsoleLog(async log => log.Context.Message.TrackingNumber.ToString("N")));
                });
            });

            configurator.ReceiveEndpoint("compensate_testactivity", x =>
            {
                x.CompensateActivityHost<TestActivity, TestLog>(h =>
                {
                    h.UseConsoleLog(async log => log.Context.Log.OriginalValue);

                    h.Log(l => l.UseConsoleLog(async log => log.Context.Log.OriginalValue));

                    h.RoutingSlip(rs => rs.UseConsoleLog(async log => log.Context.Message.TrackingNumber.ToString("N")));
                });
            });
        }
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
            _scheduler = schedulerFactory.GetScheduler();

            configurator.UseInMemoryScheduler();
        }
Exemplo n.º 4
0
 protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ConfigureSend(s => s.UseTransform<A>(t =>
     {
         t.Replace(x => x.Second, context => "World");
     }));
 }
Exemplo n.º 5
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
//            configurator.Subscribe(s =>
//                s.Handler<A>(async msg =>
//                    {
//                        _before.Release();
//                        _wait.WaitOne(TimeSpan.FromSeconds(30));
//                        _after.Release();
//                    }));
        }
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
            _scheduler = schedulerFactory.GetScheduler();

            configurator.ReceiveEndpoint("quartz", x =>
            {
                x.Consumer(() => new ScheduleMessageConsumer(_scheduler));
                x.Consumer(() => new CancelScheduledMessageConsumer(_scheduler));
            });
        }
Exemplo n.º 7
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            configurator.ReceiveEndpoint("execute_testactivity", x =>
            {
                x.ExecuteActivityHost<TestActivity, TestArguments>(_compensateUri);
            });

            configurator.ReceiveEndpoint("compensate_testactivity", x =>
            {
                x.CompensateActivityHost<TestActivity, TestLog>();
            });
        }
Exemplo n.º 8
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            var builder = new MongoUrlBuilder
            {
                DatabaseName = EventDatabaseName,
                Server = new MongoServerAddress("localhost"),
                Username = "******",
                Password = "******",
                ConnectTimeout = TimeSpan.FromSeconds(30),
                ConnectionMode = ConnectionMode.Automatic,
                GuidRepresentation = GuidRepresentation.Standard
            };

            var url = builder.ToMongoUrl();

            Client = new MongoClient("mongodb://127.0.0.1");

            Database = Client.GetDatabase(EventDatabaseName);

            _convention = new MassTransitMongoDbConventions();
        }
Exemplo n.º 9
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.UseDelayedMessageScheduler();
 }
Exemplo n.º 10
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            configurator.ConfigureRoutingSlipEventCorrelation();
        }
Exemplo n.º 11
0
        protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureInMemoryBus(configurator);

            configurator.UseRetry(x => x.None());
        }
Exemplo n.º 12
0
 protected override void ConfigureEndpoints(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ConfigureEndpoints(_container);
 }
 protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
 {
 }
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            configurator.ReceiveEndpoint("service_queue", ConfigureServiceQueueEndpoint);
        }
Exemplo n.º 15
0
        protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureInMemoryBus(configurator);

            configurator.UseMessageRetry(r => r.Intervals(200, 500));
        }
Exemplo n.º 16
0
        protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureInMemoryBus(configurator);

            configurator.UseScheduledRedelivery(r => r.Intervals(200, 500));
        }
Exemplo n.º 17
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.UseRawJsonSerializer();
 }
Exemplo n.º 18
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ServiceInstance(x => x.ConfigureEndpoints(Registration));
 }
Exemplo n.º 19
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.UsePrometheusMetrics(serviceName: "unit_test");
 }
Exemplo n.º 20
0
 protected virtual void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
 }
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            configurator.UseInMemoryScheduler();
        }
Exemplo n.º 22
0
 private void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.UseMessageScheduler(TestConstants.QuartzAddress);
 }
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            _management = configurator.ManagementEndpoint();

            base.ConfigureBus(configurator);
        }
Exemplo n.º 24
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            configurator.UseMessageScheduler(QuartzAddress);
        }
 public BusFactoryConfigurator(IInMemoryBusFactoryConfigurator configurator)
 {
     _configurator = configurator;
 }
Exemplo n.º 26
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            configurator.EnableWindowsPerformanceCounters();
        }
Exemplo n.º 27
0
            protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
            {
                base.ConfigureInMemoryBus(configurator);

                configurator.ReceiveEndpoint("service_queue", ConfigureServiceQueueEndpoint);
            }
Exemplo n.º 28
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            configurator.UseRetry(Retry.Immediate(1));

            base.ConfigureBus(configurator);
        }
Exemplo n.º 29
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ConfigureEndpoints(Registration);
 }
        protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
        {
            configurator.UseInMemoryScheduler(out _schedulerTask);

            base.ConfigureInMemoryBus(configurator);
        }
Exemplo n.º 31
0
            protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
            {
                _messageDataRepository = new InMemoryMessageDataRepository();

                configurator.UseMessageData(_messageDataRepository);
            }
Exemplo n.º 32
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            _busFactoryConfigurator = configurator;
        }
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ConfigureSend(cfg => cfg.UseFilter(new TestScopeFilter(_taskCompletionSource)));
     configurator.ConfigurePublish(cfg => cfg.UseFilter(new TestScopeFilter(_taskCompletionSource)));
 }
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ReceiveEndpoint(SubsequentQueueName, cfg => cfg.ConfigureConsumer <SubsequentConsumer>(Registration));
 }
Exemplo n.º 35
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.TransportConcurrencyLimit = 16;
 }
Exemplo n.º 36
0
 protected virtual void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     OnConfigureInMemoryBus?.Invoke(configurator);
 }
Exemplo n.º 37
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
 }
Exemplo n.º 38
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ConfigureEndpoints(_provider.GetRequiredService <IBusRegistrationContext>());
 }
Exemplo n.º 39
0
        protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureInMemoryBus(configurator);

            configurator.UseMessageScheduler(QuartzAddress);
        }
Exemplo n.º 40
0
        protected override void PreCreateBus(IInMemoryBusFactoryConfigurator configurator)
        {
            configurator.UseBsonSerializer();

            base.PreCreateBus(configurator);
        }
Exemplo n.º 41
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            configurator.UseXmlSerializer();

            base.ConfigureBus(configurator);
        }
Exemplo n.º 42
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.ConnectConsumerConfigurationObserver(new FilterConfigurationObserver());
 }
Exemplo n.º 43
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            configurator.UseRetry(Retry.Immediate(1));

            base.ConfigureBus(configurator);
        }
Exemplo n.º 44
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            configurator.UseBinarySerializer();

            base.ConfigureBus(configurator);
        }
Exemplo n.º 45
0
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            configurator.UseRetry(Retry.None);
        }
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            configurator.ConfigureRoutingSlipEventCorrelation();
        }
Exemplo n.º 47
0
 protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
 {
     ConfigureEndpoints(configurator);
 }
 protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
 {
     configurator.UseBinarySerializer();
 }
Exemplo n.º 49
0
 protected abstract void ConfigureEndpoints(IInMemoryBusFactoryConfigurator configurator);
        protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            base.ConfigureBus(configurator);

            configurator.EnableWindowsPerformanceCounters();
        }