문제

What's the best way to configure the maximum number of threads that can pull messages from an MSMQ queue, using a netMsmqBinding in WCF?

For example, say I have an MSMQ service for which I only want to have 2 (or 10, or whatever number of) worker threads pulling messages off at a time.

도움이 되었습니까?

해결책

You need Service Throttling

<behaviors>
 <serviceBehaviors>
  <behavior name="DefaultThrottlingBehavior">
   <serviceThrottling maxConcurrentCalls="2" />
  </behavior>
 </serviceBehaviors>
</behaviors>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top