What technologies are available for the publish / subscribe model using .NET?

I am currently working on an application where one application component needs to interact with several other system components based on specific events. These events occur on the basis of many different triggers ... some events are triggered by the user’s action, when other users need to be notified, some events are based on time, and other events are based on a change in the state of the object.

Based on what I have looked at so far, it seems that the cleanest way to separate application components is to create a publish / subscribe model where my objects in the component publish events that other interested application components can subscribe to.

I saw nServiceBus, and for reasons of "blocking the vendor" I can not use .NET Services in Azure. Are there other technologies? Is there any other approach I should consider?

Edit - to be clear, this application is with a large volume of web applications. The application is an ASP.NET MVC, and the MVC application communicates with several WCF services for its data.

+7
events publish-subscribe
source share
8 answers

WCF is definitely capable of handling pub / sub scripts - and will be much more when .NET 4 does not have Azure's WCF relay bindings.

Check out these related articles at this time:

For future Azure-based pubs / sub-users using the .NET Service Bus, see the following articles:

+6
source share

There's also MassTransit . I never used it, but it is often mentioned in the same conversation as nServiceBus.

Depending on what you are trying to do, there is also a Managed Extensibility Framework . This is not really a publication / subscription, but it is something you need to know about if you have not been.

+3
source share

Udi (creator of nServiceBus) has an ordered version of his domain event concept on his blog

We used this as the basis for developing a simpler implementation, such as nServiceBus, which we could use in our solution.

+2
source share

To implement the classic publish / subscribe model with .net, I would use ActiveMQ . This is very easy to understand, and if you already know JMS, the learning curve is really flat.

+1
source share

WCF

Google WCF Post Signature Model. I think part of the Juval Lowy WCF App was a great explanation for how to do this.

EDIT http://idesign.net/idesign/DesktopDefault.aspx?tabindex=5&tabid=11
Find the publication-publication structure

0
source share

Prism comes with an EventAggregator that provides freely related events.

0
source share

The answers are still good if you have a multiprocessor or SOA architecture.

If this is a simple standalone application, perhaps the C # built-in event model works well in your case. Alternatively, you can also use delegates or an interface to pass to the server / publisher.

This observer pattern link may be helpful.

0
source share

Here is a SO question about nServiceBus, Rhino Service Bus, MassTransit - Video, Demo, Learning Resources with good answers.

0
source share

All Articles