WCF-MSMQ体系结构建议 [英] WCF - MSMQ Architecture suggestion

查看:84
本文介绍了WCF-MSMQ体系结构建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,为了在访问服务器上的资源时允许并发和负载平衡,
WCF服务是通过MSMQ实施的.

不是MSMQBinding,而是MSMQ.

客户端将内容作为消息写在服务器的MSMQ队列上.
服务器上的Windows服务侦听队列.
收到消息后,它将使用消息内容执行适当的操作.

现在工作正常.您对此架构有何评论?

唯一的缺点似乎是安装了太多的

(WCF服务+ Win服务)X服务器数

更好的替代方法似乎是使用netMSMQBinding,以便WinService可以

由服务主机本身上的侦听器代替.

但是,消息人士说,MSMQ必须同时在客户端和服务器上.

客户->客户的MSMQ->消息->服务器的MSMQ->服务器

有没有一种架构可以使用netMSMQBinding跳过客户端MSMQ WHILE的方法?任何

指针?

注意:该解决方案部署在Intranet上.

Currently, to allow concurrency and load balancing while accessing a resource on server,
An WCF Service is implemented over MSMQ.

Not MSMQBinding, but Just MSMQ.

Client Writes content as Messages on Server''s MSMQ queue.
A Windows Service on Server listens to the queue.
Upon receiving a message, it performs the appropriate action using the message content.

This works fine now. Any comments on this architecture?

The only downside seems to be few too many installations

(WCF Service + Win Service) X No.Of Servers

The better alternative seems to be to use netMSMQBinding, so that the WinService can be

replaced by a listener on service host itself.

But, sources say, MSMQ needs to be on client as well as server.

Client -> Client''s MSMQ -> Message -> Server''s MSMQ -> Server

Is there a way the architecture can skip the Client MSMQ WHILE using netMSMQBinding? Any

pointers?

Note: The solution is deployed on intranet.

推荐答案

WCF可以用作使用netMSMQBinding的MSMQ消息的列表器,而无需任何其他机制(如Windows Service等)的支持.

有时,最好在发件人和收件方服务器上同时保留MSMQ,考虑到万一收件方服务器已关闭,则邮件将在发件人服务器的队列中处于等待模式.

如果要避免在发件人的服务器上使用MSMQ,则可以使用MessageQueue.ReceiveByCorrelationId方法来使远程消息事务更可靠.以下文章提供了有关此信息.

http://beaucrawford.net/post/MSMQ-ndash3b-Sending-Messages- to-Remote-Queues.aspx

您可以参考下面的链接以获取有关MessageQueue.ReceiveByCorrelationId方法的更多信息.

http://msdn.microsoft.com/en-us/library/4f31cxs4.aspx
WCF can work as a listner to MSMQ messages using netMSMQBinding without any support of any other mechanism like Windows Service etc.

Sometimes it is preferred to keep MSMQ on both Servers Sender and Reciever, Considering in case if Reciever Server is down then you will have your messages in waiting mode in Sender Server''s Queue.

In case if you want to avoid MSMQ on Sender''s Sever then you can use MessageQueue.ReceiveByCorrelationId Method to make your Remote Message transactions more reliable. Below article has information on this.

http://beaucrawford.net/post/MSMQ-ndash3b-Sending-Messages-to-Remote-Queues.aspx

You may refer below link for more information on MessageQueue.ReceiveByCorrelationId Method.

http://msdn.microsoft.com/en-us/library/4f31cxs4.aspx


这篇关于WCF-MSMQ体系结构建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆