在一个网站上MSMQ WCF的生命周期 [英] MSMQ WCF life cycle on a web site

查看:107
本文介绍了在一个网站上MSMQ WCF的生命周期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个侦听过去使用WCF队列的控制台应用程序,并与该实现没有问题。

I've created a console application that listens to a queue using WCF in the past and have no problems with that implementation.

我的问题:

如果,而不是听队列上的控制台应用程序,我通过网站收听到队列中,当消息被拾起?难道是瞬间,为的是与控制台应用程序的情况下?将消息只有当有人请求网站上的网页接收?

If, instead of listening to the queue on a console application, I listen to a queue through my website, when would the message be picked up? Would it be instant, as is the case with the console app? Would the message only be received when someone requests a page on the site?

问候。

推荐答案

一个网站是不是一个MSMQ客户当好东道主容器。原因是低流量的时间内应用程序池卸载。

A website is not a good host container for a MSMQ client. The reason is the app pool unloads during time of low traffic.

所以,有效地你是在正确的,直到应用程序池加载你不会消耗消息。

So effectively you are correct in that you will not consume message until the app pool is loaded.

不过,向您发送邮件,无论作为队列收到的客户端是否加载与否的消息并不prevent他人。然后,这些将被存储,直到客户回来消耗他们(提供的队列是持久的)。

However, that does not prevent others from sending you messages, as the queue receives the messages regardless of whether your client is loaded or not. These would then be stored until the client came back to consume them (providing the queues are durable).

一个Windows服务将是一个更合适的容器内。

A windows service would be a much more appropriate container.

这篇关于在一个网站上MSMQ WCF的生命周期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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