开发者

Asynchronous communication with WCF

I am developing a generic logging object which will be used within all of our future applications. It will s开发者_C百科ubmit a log to MSMQ, which will then asynchronously send it off to our server that will log that message to a database.

Currently I am trying to understand the architecture of how this will work. On the client side, once a log is submitted to MSMQ, will MSMQ then submit the log to WCF to send off to the server (which I assume will have another WCF endpoint receiving the messages)? Basically, I am asking what is the order of services that the log will travel through? I have read about netMsmqBinding for WCF, is this what I will need in order to send a log from MSMQ to WCF, and then I can use a basicHttpBinding to send it from WCF to WCF on the server side?

Something like:

[Client application] -> Logger -> MSMQ -> WCF ----------> [Server] WCF -> DB


WCF has netMsmqBinding that can handle both client and server messaging. If you use it MSMQ will be almost invisible to you. You will send message to WCF service, it will be put to MSMQ and server-side WCF will pick it and invoke method like with any other binding.

If you have any experience in creating WCF service you should do the same but also create MSMQ Queue.

Here are useful links: http://sukasom.wordpress.com/2008/08/18/wcf-and-msmq-part-1/, http://msdn.microsoft.com/en-us/library/ms752217.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜