You would need to explain where/how you are specifying this filter string.
But it looks like you are specifying a valid JMS selector where the system expects a core filter expression.
Core filter expression's are explained here:
Thanks for your reply.
We're using a SLSB that get's triggered via Timer that listens periodically on a queue with the given selector. The call looks like this:
consumer = session.createConsumer(queue.getDefaultDestination(), selector);
msg = consumer.receive(10000);
session is a javax.jms.Session.
consumer is a javax.jms.MessageConsumer
selector is the String as given in the exception
The WARN with the stacktrace gets printed when consumer.receive() is invoked. the exception is not thrown - only logged.
So, is the selector correctly used or ignored? when ignored, why?
Since the header JMSExpiration isn't something HornetQ specific it should work fine I guess.
Please post a small runnable test program that demonstrates the issue and someone will investigate.
Sure. No problem. For simplicitiy I've modified the jms/queue-selector example shipped with hornetq.
Simply replaced the selector:
// Step 8. Prepare two selectors
String redSelector = "JMSExpiration < 66666666";
Please find attached the modified .java file.
Ok, that's because JMSExpiration is not a valid identifier for a JMS selector.
"Message header field references are restricted to
Although it's not required by the JMS spec, I can add this if you like.
In the mean-time you can workaround it, by using the core filter syntax, i.e. use 'HQExpiration < 6666666'
Uh. Didn't know that. Thanks for figuring that out!
Since the selector of our side is configurable, I'll switch to the HQExpiration. If the spec states that (JMSExpiration not "allowed"), I wouldn't have implemented that too . We use that selector with our own message reaper - because AFAIK JBM 1.4.3 doesn't reap/expire message without a consumer. I read somewhere that HornetQ ships with its own reaper. So probably we get rid of it anyway.
Thanks for your quick help!
Yep, HornetQ has it's own reaper