Recently I've been reading a lot about distributed messaging and associated patterns. I used some of them supported by the tools like for exemple NServiceBus.
Many of those patterns are described on internet. Some of them I recently read was :
- Message Broker : http://msdn.microsoft.com/en-us/library/ff648849.aspx
- Message Bus : http://msdn.microsoft.com/en-us/library/ms978583.aspx
- Messaging patterns in SOA : http://msdn.microsoft.com/en-us/library/aa480027.aspx
- Udi Dahan's post about differences : http://www.udidahan.com/2011/03/24/bus-and-broker-pubsub-differences/
If using such tooling as NService bus alows to do a lot without thinking to much about infrastructure problems, some questions have araised when I tried to implement a basic Message Bus and command handler. In fact when it comes to these patterns I can't see many differences between them.
I won't paste code because it's to long but I found two blog posts that quite describe the idea of implementation I would like to talk about.
The idea is simple, the message bus tracks the subscribers and dispatches the messages to different subscribers if they are interested in.
- Command Handler : http://weblogs.asp.net/shijuvarghese/archive/2011/10/18/cqrs-commands-command-handlers-and-command-dispatcher.aspx
It's quite similar to message bus. The command bus invokes the command handlers for a given command type.
So in both cases there are similarities.
What are the real differences and benefits using one pattern than another (I'm not talking about supporting tooling). What I'm missing ?
The second question is. Does the message bus is valuable without the supporting tooling ? I don't see myself to impelment the support for all tenents on my own.
I'm sorry for a long and confusing question but don't hesitate to ask for more details.