Filter by multiple headers cause error during subscription in the Messaging Service

I need to subscribe to messages filtering by various headers in my android application , and to do so use a SQL92 sentence in the method setSelector in subscription options . The problem is that when the sentence is too long, causing an error during the subscription .
As I can do to filter by multiple headers without causing this error?

Hi karlix,

Please, provide us a minimal example to reproduce your issue.
Regards, Ilya