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.

* End of file tkaqdocn.c */<br />

Visual Basic (OO4O): Example Code<br />

This feature is not supported currently.<br />

Java (JDBC): Example Code<br />

This feature is not supported through the Java API.<br />

Retention and Message History<br />

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

<strong>Advanced</strong> <strong>Queuing</strong> allows the retention of the message history after consumption.<br />

The messages and their histories can be queried using SQL. This allows business<br />

analysis of the integrated system. In certain cases, messages need to be tracked. For<br />

example, if a message is produced as a result of the consumption of another<br />

message, the two are related. As the application designer, you may want to keep<br />

track of such relationships. Taken together, retention, message identifiers, and SQL<br />

queries make it possible to build powerful message warehouses.<br />

Scenario<br />

Assume that you need to determine the average order processing time. This<br />

includes the time the order has to wait in the backed_order queue. You want to<br />

know the average wait time in the backed_order queue. SQL queries can<br />

determine the wait time for orders in the shipping application. Specify the retention<br />

as TRUE for the shipping queues and specify the order number in the correlation<br />

field of the message.<br />

For simplicity, only orders that have already been processed are analyzed. The<br />

processing time for an order in the shipping application is the difference between<br />

the enqueue time in the WS_bookedorders_que and the enqueue time in the WS_<br />

shipped_orders_que (see "tkaqdoca.sql: Script to Create Users, Objects, Queue<br />

Tables, Queues & Subscribers" on page C-2 of Appendix C, "Scripts for<br />

Implementing BooksOnLine".<br />

A Sample Application Using AQ 8-27

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

Saved successfully!

Ooh no, something went wrong!