11. A computer-readable storage medium encoded with instruction that, when executed by a processor of a device, causes the device to perform acts comprising: determining an appropriate filter sub-engine to which an input message should be directed for processing against a set of queries; processing the input message using an optimized filter sub-engine if the optimized filter sub-engine comprises a grammar that supports processing of the input message; processing the input message in a general filter sub-engine if the optimized filter sub-engine grammar does not support processing of the input message; and wherein: the input message is in accordance with a query language based on eXtensible Markup Language (XML), wherein the query language is XPath; the optimized filter sub-engine supports a subset, less than the whole, of the query language; and the general filter sub-engine supports the entire query language.
11. A computer-readable storage medium encoded with instruction that, when executed by a processor of a device, causes the device to perform acts comprising: determining an appropriate filter sub-engine to which an input message should be directed for processing against a set of queries; processing the input message using an optimized filter sub-engine if the optimized filter sub-engine comprises a grammar that supports processing of the input message; processing the input message in a general filter sub-engine if the optimized filter sub-engine grammar does not support processing of the input message; and wherein: the input message is in accordance with a query language based on eXtensible Markup Language (XML), wherein the query language is XPath; the optimized filter sub-engine supports a subset, less than the whole, of the query language; and the general filter sub-engine supports the entire query language. 18. The computer-readable storage medium as recited in claim 11 , wherein each filter sub-engine includes a set of queries against which input messages directed to the respective filter sub-engine are tried, and wherein each set of queries is unique.