Some times you will get the requirement to consume messages based on some condition .
To achieve this in JMS adapter we have to mention the Message Selector property .
This field is also optional. It filters messages based on header and property information. The message selector rule is a Boolean expression. If the expression is true, then the message is consumed. If the expression is false, then the message is rejected.
For example, you want to consume messages which are from Andhra :
state in (‘Andhra’, ‘Karnataka’, ‘Tamilnadu’)
To set this property open the jms adapter and mention the value state =’Andhra’ in message selector property.
After setting the message selector property in jms adapter, it will process only those messages which matches the above condition.