-
1. Re: 15:43:18,247 WARN [FilterImpl] Invalid filter string: JMSExpiration<1285249398244
timfox Sep 24, 2010 6:11 AM (in response to veitg)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:
http://hornetq.sourceforge.net/docs/hornetq-2.1.2.Final/user-manual/en/html/filter-expressions.html
-
2. Re: 15:43:18,247 WARN [FilterImpl] Invalid filter string: JMSExpiration<1285249398244
veitg Sep 24, 2010 6:46 AM (in response to timfox)Hi.
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.
-
3. Re: 15:43:18,247 WARN [FilterImpl] Invalid filter string: JMSExpiration<1285249398244
timfox Sep 24, 2010 6:48 AM (in response to veitg)Please post a small runnable test program that demonstrates the issue and someone will investigate.
-
4. Re: 15:43:18,247 WARN [FilterImpl] Invalid filter string: JMSExpiration<1285249398244
veitg Sep 24, 2010 7:16 AM (in response to timfox)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.
Same behavior.
-
5. Re: 15:43:18,247 WARN [FilterImpl] Invalid filter string: JMSExpiration<1285249398244
timfox Sep 24, 2010 8:02 AM (in response to veitg)Ok, that's because JMSExpiration is not a valid identifier for a JMS selector.
From http://download.oracle.com/javaee/6/api/javax/jms/Message.html
"Message header field references are restricted to
JMSDeliveryMode
,JMSPriority
,JMSMessageID
,JMSTimestamp
,JMSCorrelationID
, andJMSType"
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'
-
6. Re: 15:43:18,247 WARN [FilterImpl] Invalid filter string: JMSExpiration<1285249398244
veitg Sep 24, 2010 8:16 AM (in response to timfox)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!
-
8. Re: 15:43:18,247 WARN [FilterImpl] Invalid filter string: JMSExpiration<1285249398244
timfox Sep 24, 2010 8:18 AM (in response to timfox)Yep, HornetQ has it's own reaper