Logic container for collecting events and decouple Publisher/Sender and Subscriber logic and use it independently. Based on Azure Service Bus.
The project inspired by Martin Fowler Event Aggregator Pattern and easynetq.com
- Main entry point - Bootstraps application configuration, Runs event aggregation, Sends tests messages
- Event Aggregator - [Key Component] Starts message aggregating process and Contains configuration for Event labels to Event handlers
private Dictionary<string, Func<Message, bool>> SubscriptionToLabelFuncs => new Dictionary<string, Func<Message, bool>>
{
{ "First", DoFirstHandler },
{ "Second", DoSecondHandler }
};Event Aggregator example uses simple methods for demonstration purposes , in production ready code I recomend user Services clases which should be registered via IoC container and injected to EventAggrator.cs
- Service Bus Manager - encapsulates logic which related to Azure Service Bus (Sending/Receiving messages)
- Clone repository
- Fill up valid service bus configuration option in
appsettings.json"connectionString": "Endpoint=sb://<INSTANCE-NAME>.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=<KEY>", - Build / Run console application
- (optional) Run UnitTests
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request
All changes can be easily found in RELEASENOTES
This project is licensed under the MIT License
