Event Notification Engine - MSMQ
I am working on a web application which is a sort of bidding portal where buyer post their jobs and the service provider bid against them. The application is being developed using EF 4.0 , .Net 4.0, ASP.NET and Sql Server 2008. Now there are a lot of notifications that needs to be generated and send to respective parties/users. Some example of events are: if a job is cancelled, or a bid has been selected or a message has been posted on the job by the service provider and etc. Altogether there are 14 such events.
Now what my requirement is to be able to send an email , a sms to the respective parties. Also the logged in user should be able to view these notifications through a webform when logged in.
The application demands that no notification should be missed, hence i am looking for a scalable and reliable solution here. I am explorig MSMQ and sql service broker for managing a queue for these messages/notifications bu开发者_JAVA技巧t i am not exactly sure if i am following the right direction. Also i would like to consider factors such as transaction management , uptime and scalability etc. I would appreciate any help in this regard.
I would suggest looking into using nServiceBus as it provides most of your requirements. You could also look at the CQRS pattern. You can find details on both by looking at the nServiceBus authors website http://www.udidahan.com
As an alternative to nServiceBus, you could look at Mass Transit
http://masstransit-project.com/
http://code.google.com/p/masstransit/
Mass Transit is built on top of a messaging subsystem (MSMQ) and simplifies things like subscription management, failures, sagas (long running transactions).
We use it in a production environment and it behaves reliably. Plus, it has an easy and natural API and is quite extensible.
精彩评论