Friday, October 25, 2013

In my previous post, I explained how to set custom JMS header property. In this post I will show you how to set Message Selector property in JMS adapter to filter the incoming message based on custom JMS header property.

We use Message Selector property when your messaging application needs to filter the messages it receives.

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 can enter logic, such as:
·         city in (‘Mohali’, 'Mumbai', 'Delhi')
·         city=’Mohali’


To set the Message selector property, open JMS adapter configuration Wizard. Here you can set Message selector property as shown in below diagram.

Message Selector Property
Message Selector Property

If you set Message selector property as shown in above figure then JMS adapter will process only those message which will contains custom JMS header property “city” having value “Mohali”.

0 comments :

Post a Comment