New Version of Wsp Uploaded with Filtered Subscriptions for Content-based Routing

Jun 19, 2013 at 9:53 PM
I uploaded Wsp today. Now Wsp supports filtered subscriptions. When you subscribed to an event type, you can now optionally provide a filter. The filter is C# code. The code is provided as a string. The method which the code will be compiled within is:
    public bool FilterMethod(WspEvent wspEvent)
(filter code)
An example of what a filter could be is:
 "string s; if (wspEvent.Headers.TryGetValue(100, out s) == true) { if ((s.GetHashCode() % 3) == 0) return true; } return false;"
This example gets a header value, calculates the modulo of its hash code, and is subscribing when the modulo equals 0.

With filtered subscriptions, Wsp can now do content-based routing of events.