开发者

Windows Service Reading from MSMQ through WCF...Throttling

开发者 https://www.devze.com 2023-03-25 01:38 出处:网络
I have a windows service that reads my message queue through WCF. I want the service to proce开发者_运维百科ss not more than 50 messages from queue. I set the throttling configuration to 50 , but it d

I have a windows service that reads my message queue through WCF. I want the service to proce开发者_运维百科ss not more than 50 messages from queue. I set the throttling configuration to 50 , but it does not seem to do anything. It just process one message after the other.

Am i missing something?

My web.config :

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

My Service File:

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

Please let me know if there is anything to be changed.


I don't think you should set maxConcurrentCalls and maxConcurrentSessions, can you try to remove them?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号