When working with Flex messaging, a Consumer component can filter the messages it receives using a selector. The selector uses SQL 92 syntax to filter against message headers, so if my messages contained a header named roomID I could write something like:
The problem I ran into today was that I wanted to filter on multiple values using an IN clause, however when I tried to do the following I got no messages:
Turns out that I needed to modify my IN statement to filter for string values as opposed to numeric values:
This was a little confusing because I was able to filter on single values using numeric values, as in my first example above, but filtering on multiple values required string values. I'm using BlazeDS with ColdFusion, so I'm not sure if this is specific to my configuration, but if you run into issues trying to filter on numeric values using an IN clause, try using strings instead.
UPDATE: After further testing I'm not entirely sure that selectors work at all with the ColdFusion Event Gateway Adapter. I'm still trying to work this out, but right now the first example above doesn't seem to be working for me, even if I check for a string value. If anyone has experience using selectors with CF please let me know...