WCF 服务对所有请求进行排队
我有一个 wcf 服务并处理很多客户端(服务器文档生成)。该服务应该接收大量请求并且应该在队列中处理。它还有一个回调。 (回调将返回成功生成的文档)。我仍在使用PIA,并且将来会实现OpenXML。
wcf msmq 是实现这个的方法吗?
有没有可能相关的样本?以前它在本地计算机中运行,但现在想将其更改为所谓的“服务器生成”
I have a wcf service and handle a lot of client (server document generation). This service should receive a lot of request and should be handle in queue. It also have a callback. (callback will return successfully generated document). I am still using PIA and will implement OpenXML in the future.
Is it wcf msmq is the way to implement this?
Is there any samples might be related? Previously its running in local machine but now want to change it as a so called "Server generated"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WCF MSMQ 不直接支持回调 - 它仅支持单向操作。但例如本文讨论如何添加此支持。使用默认配置,您可以将消息发送回原始发件人,但它不是回调。为了支持响应,每个客户端都必须公开队列并传递其队列地址作为请求的一部分,以便能够从服务接收消息。有关 MSMQ 中的响应的更多信息,请参阅 MSDN 杂志。
WCF MSMQ doesn't support callback directly - it supports only one-way operations. But for example this article discuss how to add this support. With default configuration you can send message back to original sender but it is not a callback. To support responses every client will have to expose queue and pass address of its queue as part of the request to be able to receive the message from the service. More about responses in MSMQ is in MSDN magazine.