开发者

WCF 4 RoutingService EndpointAddressMessageFilter contract based routing

I watched Matt Sniders RoutingService video on endpoint.tv and his comment on service virtualisation got me thinking. I have changed all of my services to use the discovery service to announce themselves and, the next step I will create a service repository so when services are announced the router service extension modify its routing table.

The idea is that any service can simply hook up to the router, and invoke an operation to a known contract. The router will know where to route the contract's action request based on the routing table that is updated each time a service is announced online or offline by the discovery service.

My question is how do I achieve this. I am new to WCF let alone RoutingService so please bear with me! Would I setup a filter table such as (with the * to wildcard any operation based on that contract - just a guess)?

<filters>
  <filter name="RegisterEventFilter" filterType="Action" filterData="CalcLib.ICalcLib/*"/>
  <filter name="RegisterAtten开发者_如何学GodeeFilter" filterType="Action" filterData="OrderLib.IOrder/*"/>
</filters>

Or would I need to use EndpointAddressMessageFilter instead?

Appreciate the help in advance.

Chris


I haven't tried using the RoutingService with a discovery service but if you just want to redirect all actions (operation calls) to a target service then the EndpointName filterType is the way to go. Also, I don't believe that the Action filterType supports a wildcard in the filterData attribute. Here is a MSDN article that shows how the various filter types are configured. Its rambling and long because it covers most of the filterType options with examples but the information is solid.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜