Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NServiceBus Publish/Subscribe

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 (http://docs.particular.net/samples/pubsub/) we noticed it did not solve the following two scenarios:

  1. All publishers publish the same message type
  2. 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:

  1. 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://docs.particular.net/nservicebus/messaging/publish-subscribe/

  2. 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?

like image 485
Matt Avatar asked Nov 06 '22 12:11

Matt


1 Answers

This has been discussed on the discussion group here:

http://nservicebus.grouply.com/message/7059

In short, you would have each node send rather than publish to a single endpoint.

Hope that helps.

like image 174
Udi Dahan Avatar answered Nov 15 '22 13:11

Udi Dahan