Pergunta

We are currently implementing a windows service which needs to publish information that a windows or web application can subscribe to. The information published should consist primarily of strings and will be used to log tasks that the service is performing, so there will be a constant stream of information being sent to subscribed applications.

I have been researching technologies such as MSMQ, WCF, and ESBs such as Nservicebus, but as I am very new to working with both windows services and application subscriptions, it has been difficult so far to get an idea of the strengths of each and which (if any) would be ideal for this type of project. Can anyone who is more familiar with these options offer some of the pros/cons that these technologies provide?

To better summarize my earlier paragraph, the project is expected to operate under the following conditions:

  1. Messages are continuously published from the service to any subscribed applications
  2. Communication is expected to be one-way (service to application), so downtime from any application should not affect the work of the service
  3. The service must publish to both windows applications and web applications
  4. New applications may need to subscribe in the future without disrupting the work of the service (seems like a given, but as I said, I am unfamiliar with the options)
  5. The preferred language for the program is C#.

Thank you very much for your time, and any advice regarding these or more suitable technologies would be greatly appreciated.

Foi útil?

Solução

There's a lot of options around MSMQ and WCF. There are a couple of different methods and frameworks that could help, depending on many factors.

If you would like to do it you self with a little guidance, i suggest that you take a look at Tom Hollanders great posts:

http://blogs.msdn.com/b/tomholl/archive/2008/05/17/building-a-pub-sub-message-bus-with-wcf-and-msmq.aspx

http://blogs.msdn.com/b/tomholl/archive/2008/07/12/msmq-wcf-and-iis-getting-them-to-play-nice-part-1.aspx

There are other more "complete" options if you're into using an existing servicebus such as BizTalk, nServiceBus or MassTransit.

Another option is Multicasting wich is available since MSMQ 3.0, which is such a feature that will support scenarios where you have one publisher (your windows service) to multiple recievers (your windowsapp and webapp). Both sender and recievers can use the MsMqIntegration binding to interact with the queues.

I suggest that you take a look at: http://blogs.msdn.com/b/solutions/archive/2005/09/20/471615.aspx

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top