Skip to content

mehmetdemirci/event-bus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

event-bus

This is a sample implementation of the EventBus that provides a way to implement event publishing and subscriptions, using with CAP.

Running

  • Clone repository git clone https://github.com/mehmetdemirci/event-bus.git
  • Open directory src\WebApi in command line and execute dotnet build then dotnet run.

You can also open the Dashboard by visiting the url http://localhost:xxx/cap.

public static IServiceCollection AddEventSubscription(this IServiceCollection services)
{
    services.SubscribeEventBus<SingleGroup1EventHandler, SingleIntegrationEvent>();
    services.SubscribeEventBus<SingleGroup2EventHandler, SingleIntegrationEvent>();

    services.SubscribeEventBus<MultiGroup1EventHandler, GroupIntegrationEvent>(DispatchMode.Broadcast, "Group1");
    services.SubscribeEventBus<MultiGroup2EventHandler, GroupIntegrationEvent>(DispatchMode.Broadcast, "Group2");

    return services;
}

Sample

License

License

Releases

No releases published

Packages

No packages published

Languages