Wednesday, March 28, 2012

Receiving a message with a specific contract

If the service is defined with multiple contracts is there a way to receive a message with a specific contract?

No. I'm curious to understand why do you want this, can you give a bit of detail?

Thanks,
~ Remus

|||

I am implementing a queue processing system. You can get some of the info here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=446600&SiteID=1. The queue can contain messages of different contracts/types. When I receive a message I instantiate a different processing component based on the contract/type of the message. There are processing servers that process different kind of messages. The single processing server might only have a subset of processing components. This is why I need a way to retrieve messages based on the contract/type.

Alex

|||

You can try having one service as front end that simply forwards each dialog to specialized services on the back end, similar to the approach described here: https://blogs.msdn.com/remusrusanu/archive/2006/03/28/563571.aspx

Each supported contract would be forwarded to a different service.

HTH,
~ Remus

|||

I have a working implementation without Service Broker which handles message types and message priority (another one Service Broker does not handle directly). It does not make sence to switch to Service Broker which would also require to increse the complexity of the architecture.

Alex

No comments:

Post a Comment