【问题标题】:Windows Service Reading from MSMQ through WCF...ThrottlingWindows 服务通过 WCF 从 MSMQ 读取...限制
【发布时间】:2011-10-17 20:08:57
【问题描述】:

我有一个通过 WCF 读取我的消息队列的 Windows 服务。我希望该服务处理来自队列的不超过 50 条消息。我将节流配置设置为 50 ,但它似乎没有做任何事情。它只是一个接一个地处理消息。

我错过了什么吗?

我的 web.config :

<serviceThrottling maxConcurrentCalls="1" maxConcurrentSessions="1" maxConcurrentInstances="50" />

我的服务文件:

[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerCall)]

如果有什么要更改的,请告诉我。

【问题讨论】:

    标签: wcf windows-services msmq throttling


    【解决方案1】:

    我认为您不应该设置 maxConcurrentCalls 和 maxConcurrentSessions,您可以尝试删除它们吗?

    【讨论】:

      猜你喜欢
      • 2010-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-10
      • 1970-01-01
      相关资源
      最近更新 更多