https://github.com/boriszn/servicebus.eventagregator
Logic container for collecting events and decouple Publisher/Subscriber logic and use it independently. Intended for Azure Service Bus.
https://github.com/boriszn/servicebus.eventagregator
azure azure-service-bus event-driven event-sourcing rabbitmq service-bus
Last synced: 7 months ago
JSON representation
Logic container for collecting events and decouple Publisher/Subscriber logic and use it independently. Intended for Azure Service Bus.
- Host: GitHub
- URL: https://github.com/boriszn/servicebus.eventagregator
- Owner: Boriszn
- License: mit
- Created: 2017-11-19T19:46:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-03T10:27:12.000Z (about 7 years ago)
- Last Synced: 2024-05-22T23:21:36.957Z (over 1 year ago)
- Topics: azure, azure-service-bus, event-driven, event-sourcing, rabbitmq, service-bus
- Language: C#
- Homepage:
- Size: 76.2 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ServiceBus EventAggregator
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](https://martinfowler.com/eaaDev/EventAggregator.html) and [easynetq.com](http://easynetq.com/)
## Architecture overview

* *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```javascript
private Dictionary> SubscriptionToLabelFuncs => new Dictionary>
{
{ "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)
## Installation
1. Clone repository
2. Fill up valid service bus configuration option in `appsettings.json`
`"connectionString": "Endpoint=sb://.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=",`
3. Build / Run console application
4. (optional) Run UnitTests## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request## History
All changes can be easily found in [RELEASENOTES](ReleaseNotes.md)
## Related options
* [MediatR](https://github.com/jbogard/MediatR)
* [Brighter](https://brightercommand.github.io/Brighter/)
* [MassTransit](http://masstransit-project.com/MassTransit/)## License
This project is licensed under the MIT License