How to use Message Selector property in AQ

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.

Description of Figure 7-12 follows

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’”/>


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s