I’ve done a lot of work implementing both ESB and Publish / Subscibe patterns and I have come to the conclusion that they are not really compatible with each other, at least not in BizTalk 2010.
- The Publish / Subscribe model works best when you have one master data source (the publisher) and you need to keep slave datastores in sync with the master.
- ESB is more suited to a model which is opposite to publish subscribe, where there are multiple publishers passing messages to one subscriber. For example a chain of shops taking orders for products from various store outlets into one central order processing system. It can also be use for exposing functionality and data via WCF services using one universal end point.
The ESB is not really worth the effort unless you have a lot of clients calling your services which are not within your control, e.g. external suppliers or resellers. In this case the ESB give you the flexibility to add new services and schemas without having to ask all of your 3rd party clients to update their code. If you are developing services that will only ever be consumed from within your own organisation then I’d recommend giving it a miss as it just adds complexity for little or no benefit.
I started a discussion on MSDN a few months ago and it seems others have come to the same conclusion.