We are trying to find an elegant solution for reporting exceptions generated by our infrastructure systems, which are easier to work than viewing email or checking log files. The service bus publish / subscribe model could solve this problem fairly neatly. Services will post errors / events, and the subscriber can filter these messages with a simple pattern matching.
We studied the NServiceBus project and wondered if it would fulfill our requirements by looking at the PubSub sample ( http://docs.particular.net/samples/pubsub/ ), we noticed that we did not solve the following two scenarios:
- All publishers post the same message type.
- Subscriber must not require knowledge of publisher endpoints
We managed to achieve these requirements, but we are not sure of the correct configuration. Below are our solutions:
All publishers use the same subscription storage configuration (DBSubscriptionStorage), which is a shared database, as described in the Storage Storage section of the documentation http://docs.particular.net/nservicebus/messaging/publish-subscribe/
All publishers / subscribers are configured to use the distributor as described in the documentation on the nservicebus website.
We would like to know if this is the correct implementation of the NServiceBus publish / subscribe model, or could there be another solution that will help us achieve our goals?
source
share