We are trying to find an elegant solution for reporting exceptions generated from systems across our infrastructure that's easier to operate on than viewing e-mail or checking log files. The publish/subscribe model across a service bus, would solve this problem quite neatly. Services would publish errors/events and a subsriber could filter these messages using simple pattern matching.
We've been investigating the NServiceBus project and wondered whether it would achieve our requirements, looking at the PubSub sample (NServiceBus.2.0.0.1145\samples\PubSub) we noticed it did not solve the following two scenarios:
- All publishers publish the same message type
- The subscriber should not require knowledge of publisher endpoints
We have managed to achieve these requirements, but we're unsure whether the configuration is correct. The following are our solutions:
All publishers share the same subscription storage configuration (DBSubscriptionStorage), which is a shared database as described in the Subscription Storage section of the documentation http://www.nservicebus.com/PubSubApiAndConfiguration.aspx
All publishers/subscribers are configured to use a distributor as described in the documentation on the nservicebus website.
We would like to know whether this is the correct implementation of the NServiceBus publish/subscribe model, or whether there might be another solution that would acheive our goals?