开发者

How should an WCF receiver service monitor an MSMQ queue and service requests in a real-world environment?

开发者 https://www.devze.com 2023-04-11 20:30 出处:网络
I have a service that queues requests in MSMQ. On the other side I have a WCF service that can handle those requests. How can I have the WCF receiver service respond when messages are available on the

I have a service that queues requests in MSMQ. On the other side I have a WCF service that can handle those requests. How can I have the WCF receiver service respond when messages are available on the queu开发者_如何学Pythone?


You are using the netMsmqBinding or the msmqIntegrationBinding?

Then your service method will automatically be called when a message is placed on the queue.

To ensure this, your OperationContract should look similar to this:

[OperationContract(IsOneWay = true, Action = "*")]
void HandleMyMessage (MsmqMessage<String> message);

Hope this helps some

0

精彩评论

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

关注公众号