【问题标题】:WCF MSMQ consumer thread countWCF MSMQ 使用者线程数
【发布时间】:2011-02-15 13:33:42
【问题描述】:

使用 WCF 中的 netMsmqBinding 配置可以从 MSMQ 队列中提取消息的最大线程数的最佳方法是什么?

例如,假设我有一个 MSMQ 服务,我只想让 2 个(或 10 个,或任何数量的)工作线程一次提取消息。

【问题讨论】:

    标签: .net wcf multithreading msmq consumer


    【解决方案1】:

    你需要Service Throttling

    <behaviors>
     <serviceBehaviors>
      <behavior name="DefaultThrottlingBehavior">
       <serviceThrottling maxConcurrentCalls="2" />
      </behavior>
     </serviceBehaviors>
    </behaviors>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-02
      • 2010-11-21
      • 2012-07-20
      • 1970-01-01
      • 1970-01-01
      • 2012-11-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多