In this post you will see how to configure message selector property in BPEL AQ.
When a dequeue is performed from a multi consumer queue, it is sometimes necessary to screen the messages and accept only those that meet certain conditions. These conditions can be based on payload or queue header values and is specified using
MessageSelectorRule property of the adapter.
Message Selectors allow you to filter the messages that a MessageConsumer will receive.
When configuring the AQ in jdeveloper you will find the below screen , where you will provide correlation id and dequeue condition.
Enter a Boolean expression similar to the
WHERE clause of a
SQL query. This expression can include conditions on message properties, user data properties (
object payloads only), and PL/SQL or SQL functions.
This field is displayed for inbound single consumer and multiconsumer queues.
In JCA file condition looks like below .
<property name=”MessageSelectorRule” value=”b.my_data.amount > ‘1000’”/>