09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

General Features of <strong>Advanced</strong> <strong>Queuing</strong><br />

Setting Up Propagation Enable propagation from each publisher application queue.<br />

To allow subscribed messages to be delivered to remote queues, the Order Entry<br />

application enables propagation by means of the following statement:<br />

execute dbms_aqadm.schedule_propagation(queue_name => 'OE.OE_bookedorders_que');<br />

Publishing Messages Booked orders are published by the Order Entry application<br />

when it enqueues orders (into the OE_booked_order_que) that have been<br />

validated and are ready for shipping. These messages are then routed to each of the<br />

subscribing applications. Messages are delivered to local queues (if specified) at<br />

each of the subscriber applications.<br />

Receiving Messages Each of the shipping applications and the Customer Service<br />

application will then receive these messages in their local queues. For example,<br />

Eastern Region Shipping only receives booked orders that are for East Coast<br />

addresses or any U.S. order that is marked RUSH. This application then dequeues<br />

messages and processes its orders for shipping.<br />

Support for <strong>Oracle</strong> Real Application Clusters<br />

Real Application Clusters can be used to improve AQ performance by allowing<br />

different queues to be managed by different instances. You do this by specifying<br />

different instance affinities (preferences) for the queue tables that store the queues.<br />

This allows queue operations (enqueue and dequeue) on different queues to occur<br />

in parallel.<br />

The AQ queue monitor process continuously monitors the instance affinities of the<br />

queue tables. The queue monitor assigns ownership of a queue table to the specified<br />

primary instance if it is available, failing which it assigns it to the specified<br />

secondary instance.<br />

If the owner instance of a queue table terminates, the queue monitor changes<br />

ownership to a suitable instance such as the secondary instance.<br />

AQ propagation is able to make use of Real Application Clusters, although it is<br />

transparent to the user. The affinities for jobs submitted on behalf of the<br />

propagation schedules are set to the same values as that of the affinities of the<br />

respective queue tables. Thus a job_queue_process associated with the owner<br />

instance of a queue table will be handling the propagation from queues stored in<br />

that queue table, thereby minimizing pinging. Additional discussion on this topic<br />

can be found under AQ propagation scheduling (see "Scheduling a Queue<br />

Propagation" on page 9-71 in Chapter 9, "Administrative Interface").<br />

8-30 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!