I am reading a lot about Servicebus implementations (NServicebus, MassTransit,...) and I think I have understand how a Servicebus works. I am still not sure what the right scenario is to use one, because I know myself and I tend to use technologies although they may be an overhead for needs.
So my question is: What are some good reasons/scenarios to use a Servicebus and do I need to use DDD technics to use it?
Some scenarios I thought of:
- Communication with external systems (e.g. my application is communicating with external systems and I want to make sure these get called, e.g. I persist an object within my database but I also have to call an external Webservice to synchronize data. I would create a Command and I would have 2 Handlers that get the event, one persisting to my database, the other one handling the webservice. If on command fails it will be retried)
- Scalability (I would be able to scale out on multiple machines)
- It may lead to cleaner code (instead of performing several sequential tasks when e.g. an Entity is updated I oculd have different Messagehandlers that perform these tasks in isolation, e.g. save the entity, another Handler could perform an update on a denormalized datastore etc).