Oracle AQ Adapter Integration with Oracle BPEL Process Manager

Oracle JCA Adapter for AQ 7-3

7.2.1 Enqueue-Specific Features Message Production

The Oracle AQ Adapter supports the following features of Oracle Streams AQ: ■ Correlation Identifier In the Adapter Configuration Wizard, you can specify a correlation identifier when defining an enqueue operation, which you use to retrieve specific messages. ■ Multiconsumer Queue In Oracle Streams AQ, more than one consumer can process and consume a single message. To use this feature, you must create multiconsumer queues and enqueue the messages into these queues. In this configuration, a single message can be consumed by more than one AQ consumer dequeue operation, either through the default subscription list or with an override recipient list. Under this scenario, a message remains in the queue until it is consumed by all of its intended consumer agents. The Oracle AQ Adapter enqueue header property jca.aq.RecipientList enables you to specify the override recipient list string values separated by commas that can retrieve messages from a queue. All consumers that are added as subscribers to a multiconsumer queue must have unique values for the Recipient parameter. This means that two subscribers cannot have the same values for the NAME, ADDRESS, and PROTOCOL attributes. ■ Message Priority If you specify the priority of enqueued messages, then the messages are dequeued in priority order. If two messages have the same priority, then the order in which they are dequeued is determined by the enqueue time. You can also create a first-in, first-out FIFO priority queue by specifying the enqueue time priority as the sort order of the messages. This priority is a property of the Oracle AQ Adapter enqueue header. The enqueue time is set automatically by the underlying AQ application. Here is an example of how to create the FIFO queue: EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE \ queue_table = OE_orders_pr_mqtab, \ sort_list =priority,enq_time, \ comment = Order Entry Priority \ MultiConsumer Orders queue table,\ multiple_consumers = TRUE, \ queue_payload_type = BOLADM.order_typ, \ compatible = 8.1, \ primary_instance = 2, \ secondary_instance = 1; EXECUTE DBMS_AQADM.CREATE_QUEUE \ queue_name = OE_bookedorders_que, \ queue_table = OE_orders_pr_mqtab; ■ Time Specification and Scheduling In Oracle Streams AQ, you can specify a delay interval and an expiration interval. The delay interval determines when an enqueued message is marked as available to the dequeuers after the message is enqueued. When a message is enqueued with a delay time set, the message is marked in a WAIT state. Messages in a WAIT state are masked from the default dequeue calls. The expiration time property is used to specify an expiration time, and the message is automatically moved to an exception queue if the message is not consumed before its expiration. 7-4 Oracle Fusion Middleware Users Guide for Technology Adapters

7.2.2 Dequeue and Enqueue Features

Oracle Streams AQ provides the following dequeuing options: ■ Poll option ■ Notification option The poll option involves processing the messages as they arrive and polling repeatedly for messages. The Oracle AQ Adapter supports a polling mechanism for consuming AQ messages. The Oracle AQ Adapter supports the following features of Oracle Streams AQ: ■ Multiconsumer Queue The Oracle AQ Adapter can retrieve messages from a multiconsumer queue. ■ Navigation of Messages for Dequeuing Messages do not have to be dequeued in the same order in which they were enqueued. You can use a correlation identifier to specify dequeue order. The Adapter Configuration Wizard defines the correlation ID for the dequeue operation. ■ Retries with Delays The number of retries is a property of the Oracle AQ Adapter dequeue header. If the number of retries exceeds the limit, then the message is moved to an exception queue that you specify. The exception queue is a property of the Oracle AQ Adapter enqueue header. ■ Rule-Based Subscription Oracle Streams AQ provides content-based message filtering and subject-based message filtering. A rule defines one or more consumers interest in subscribing to messages that conform to that rule. For a subject-based rule, you specify a Boolean expression using syntax similar to the WHERE clause of a SQL query. This Boolean expression can include conditions on message properties current priority and correlation ID, user data properties object payloads only, and functions as specified in the WHERE clause of a SQL query. ■ Oracle AQ Adapter Header Properties For more information about Oracle AQ Adapter header properties, see Appendix A.3, Oracle AQ Adapter Properties. ■ Dequeue Condition The Dequeue condition is an advanced queuing product feature that Oracle AQ Adapter uses. If a dequeue condition is specified and no messages meet the specified condition, then no dequeue will happen. A dequeue condition element is a Boolean expression using syntax similar to the WHERE clause of a SQL query. This Boolean expression can include conditions on message properties, user object payload data properties, and PLSQL or SQL functions. Message properties include priority, corrid, and other columns in the queue table. When a dequeue is performed from a multisubscriber queue, it is sometimes necessary to screen the messages and accept only those that meet certain conditions. These conditions may concern header information, such as in selecting messages of only priority 1, or some aspect of the message payload, such as in selecting only loan applications above 100,000.