NServiceBus 主机中的 WCF 服务托管问题
我们的一个团队刚刚完成了一个使用 WCF 和 N服务总线。当我审查该项目时,我发现他们选择了主办 WCF 服务和 NServiceBus 位于 IIS 中,而不是 NServiceBus 主机。
当我询问为什么会这样时,我被告知当他们托管 WCF 服务时 (在 TCP 绑定上)在 NServiceBus 主机中,WCF 会定期“获取” 卡住'。这在实践中意味着什么,通常每天一次 WCF 服务将开始主动拒绝连接。
据我了解,IIS 内部有自定义代码来监控运行状况 WCF 端点并在它们“卡住”时重新启动它们。我想 避免在 IIS 中托管,因为您无法获得所有基于约定的好处 使用 NServiceBus 主机。
谁能对这个问题有更多的了解或建议我们可以采取的方法 使用 NServicebusHost 时避免出现此问题吗?
PS 我意识到问题的描述有点模糊,我也希望有人能够帮助我改进问题。
One of our teams here has just completed a project using both WCF and
NServiceBus. When I reviewed the project I found that they had chosen to host
the WCF services and NServiceBus in IIS instead of NServiceBus host.
When I queried as to why this was I was told that when they hosted WCF services
(on TCP binding) in the NServiceBus Host that the WCF would regularly 'get
stuck'. What this meant in practice that usually around once a day the WCF
service would start actively refusing connections.
It is my understanding that IIS has custom code inside it to monitor the health
of the WCF endpoints and restart them when they 'get stuck'. I would like to
avoid hosting in IIS though as you don't get all the convention based goodness
of using NServiceBus host.
Can anyone shed any more light on this issue or suggest ways we might be able to
avoid the issue while using the NServicebusHost?
PS I Realise the description of the problem is a little vague I'm also hoping someone might be able to help me improve the question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法理解将所有内容托管在一个容器中的必要性。您不能在 IIS 中托管 WCF 端点,并通过 Windows 服务中的通用主机托管 NSB 端点吗?然后可以将它们作为单独的关注点进行管理。
I can't understand the need to host everything in one container. Can't you host your WCF endpoints in IIS and your NSB endpoints via the generic host in a windows service. Then they can be managed as separate concerns.