Exemple #1
0
 public static void Register(this IBusRegistry registry, params IWorker[] workers)
 {
     foreach (var worker in workers)
     {
         registry.Register(worker);
     }
 }
Exemple #2
0
 protected override void RegisterHandlersInBus(IBusRegistry bus)
 {
     bus.Register <EventPublisherStarted>(this);
     bus.Register <EventHandlerStarted>(this);
     bus.Register <EventPollerStarted>(this);
     bus.Register <EventPollerStopped>(this);
     bus.Register <EventProcessorStopped>(this);
     bus.Register <EventPublisherStopped>(this);
 }
Exemple #3
0
 protected override void RegisterHandlersInBus(IBusRegistry bus)
 {
     bus.Register<StartEventPoller>(this);
     bus.Register<StopEventPoller>(this);
     bus.Register<PollResponseWasReceived>(this);
     bus.Register<IncomingEventHasBeenProcessed>(this);
     bus.Register<IncomingEventIsPoisoned>(this);
     bus.Register<AddNewSubscriptionOnTheFly>(this);
 }
 public MassTransitHostedService(IBusRegistry registry)
 {
     _registry = registry;
 }
Exemple #5
0
 protected override void RegisterHandlersInBus(IBusRegistry bus)
 {
     // no handlers...
 }
Exemple #6
0
        public static async Task Start(this IBusRegistry registry, TimeSpan timeout)
        {
            using var cancellationTokenSource = new CancellationTokenSource(timeout);

            await registry.Start(cancellationTokenSource.Token).ConfigureAwait(false);
        }
Exemple #7
0
 protected override void RegisterHandlersInBus(IBusRegistry bus)
 {
     bus.Register <NewIncomingEvents>(this);
     bus.Register <PollResponseWasReceived>(this);
     bus.Register <IncomingEventHasBeenProcessed>(this);
 }
 protected override void RegisterHandlersInBus(IBusRegistry bus)
 {
     // no handlers...
 }
Exemple #9
0
 protected override void RegisterHandlersInBus(IBusRegistry bus)
 {
     bus.Register <StartEventPublisher>(this);
     bus.Register <StopEventPublisher>(this);
 }
Exemple #10
0
 protected abstract void RegisterHandlersInBus(IBusRegistry bus);
Exemple #11
0
 protected override void RegisterHandlersInBus(IBusRegistry bus)
 {
     bus.Register <StartEventHandler>(this);
     bus.Register <StopEventHandler>(this);
     bus.Register <NewIncomingEvents>(this);
 }