Hi, how to user selector at tJMSInput component?
I have JMS Message with Properties IterationID with values 1,2,3..
MESSAGE_FROM field "queue.test?selector=IterationID=1" does not work.
How to set MESSAGE_SELECTOR_EXPRESSION? "IterationID=1" does not work.
Could you provide me an working example?
PS: JMS Messages are created via tJMSOutput with help of tJavaRow
javax.jms.TextMessage m = session_tJMSOutput_1.createTextMessage();
output_row.message = m;
Last edited by martin.pelikan (2017-02-23 17:16:06)
From ActiveMQ DOCS:
The JMS spec states that a String property should not get converted to a numeric when used in a selector. So for example, if a message has the 'age' property set to String '21' then the following selector should not match it: 'age > 18'. Since ActiveMQ support STOMP client which can only send messages with string properties, that restriction is a bit limiting. If you want your JMS selectors to auto-convert String properties the the appropriate number type, just prefix the the selector with 'convert_string_expressions:'. If you changed selector in the previous example to be 'convert_string_expressions:age > 18', then it would match the message.