Introduction To Oracle Advanced Queue
Introduction To Oracle Advanced Queue
The documents or revised pages are subject to document control. Please keep them up-to-date, using the release notice from the distributor of the document. These are confidential documents. Unauthorized access or copying is prohibited. Approved by : Authorized by : Date: Date:
Re v. N o. 1
Action Taken
Table of Contents
1.INTRODUCTION.....................................................................................................................................................1 1.1. ADVANCED QUEUE ...........................................................................................................................................1 1.2. HISTORY.........................................................................................................................................................1 1.3. DOCUMENTS GOAL:.........................................................................................................................................1 2.ORACLE ADVANCED QUEUE............................................................................................................................1 2.1. OVERVIEW.......................................................................................................................................................1 2.2. PRODUCERS.....................................................................................................................................................1 2.3. QUEUES...........................................................................................................................................................1 2.4. QUEUE-TO-QUEUE TRANSMISSION:......................................................................................................................4 3.CONCLUSION..........................................................................................................................................................7
1. Introduction
1.1. Advanced Queue
Advanced Queuing (AQ) apart from managing all the data inside the Oracle database, can also manage the flow and exchange of data using messages to different systems. Message queuing functionality is natively used inside the database. AQ leverages this Message queuing functionality. AQ provides easy manageability, high availability, high performance and security. AQ supports point-to-point and publish/subscribe queues, persistent and buffered messaging, and message ordering priorities that offer flexibility and powerful messaging functionality to applications.
1.2.
History
Oracle AQ was introduced in Oracle 8. Since release 10.1, AQ is integrated into Oracle Streams, and is called "Oracle Streams AQ".
1.3.
Documents Goal:
The goal of this document is to give an Introduction to features of Oracle Advanced Queue.
Producer applications enqueue messages and consumer applications dequeue messages. At the most basic level of queuing, one producer enqueues one or more messages into one queue. Each message is dequeued and processed once by one of the consumers.
2.2.
Producers
Database triggers, batch jobs, external applications and JWS queues can serve as producers.
2.3.
Queues
Every queue must be associated with a queue table. Queue table defines properties of queue. Queue table are reported in DBA_QUEUE_TABLES. Queue tables are managed using DBMS_AQADM.
Page 1 of 12
There are four types of queues: 1) Single Consumer Queue 2) Multiple-Consumer Queue 3) Buffered Queue 4) Persistent Queue
2.3.1.
Page 2 of 12
2.3.2.
Multiple-Consumer Queue
2.3.3.
Buffered Queue
Buffered messaging combines the rich functionality that Oracle Streams AQ has always offered with a much faster queuing implementation. Buffered messaging is faster than persistent messaging, because its messages reside in shared memory. They are usually written to disk only when the total memory consumption of buffered messages approaches the available shared memory limit. Buffered messaging is ideal for applications that do not require the reliability and transaction support of Oracle Streams AQ persistent messaging.
Page 3 of 12
The portion of a queue that stores buffered messages in memory is sometimes referred to as a buffered queue. Message retention is not supported for buffered messaging.
2.3.4.
Persistent Queue
When persistent messages are enqueued, they are stored in database tables. The performance characteristics of queue operations on persistent messages are similar to underlying database operations. The code path of an enqueue operation is comparable to SELECT and INSERT into a multicolumn queue table with three indexorganized tables. The code path of a dequeue operation is comparable to a SELECT operation on the multi-column table and a DELETE operation on the dequeue index-organized table. In many scenarios, for example when Oracle Real Application Clusters (Oracle RAC) is not used and there is adequate streams pool memory, the dequeue operation is optimized and is comparable to a SELECT operation on a multi-column table.
2.4.
Queue-to-Queue Transmission:
The technique for transmitting the messages from one queue to another is called Propagation. There are various usages for propagation.
Page 4 of 12
2.4.1.
Fanning-Out Messages
This technique is normally used in case of multi-database architecture where load balancing of message sending has to be achieved. Whenever message is enqueued in HQ queue, it is propagated to Regional 1 and 2 queues. The Regional 1 and 2 queues in turn will propagate the messages to their respective subscribers. There are rule based propagations that makes this happen.
Page 5 of 12
2.4.2.
Funneling-In Messages
The other technique of propagating messages is the reverse of fanning. Here the Users will be propagating messages to Regional and it in turn will propagate to HQ queue. This method is called Funneling in messages.
Page 6 of 12
3. Conclusion
Oracle Advanced Queuing, built into the Oracle Database, offers a robust platform to standardize and integrate the various technologies and applications inside the datacenter. Businesses can leverage the AQs enterprise messaging infrastructure to build highly scalable and reliable distributed applications. Powerful AQ features such as differing qualities of service, automatic message transformations, and propagations give businesses the tools needed to design a powerful and flexible messaging platform. Database integrated Advanced Queuing provides smooth, real-time flow of criti-
Page 7 of 12
cal information, less management and more productivity for your ever growing, scalable, highly available business.
Page 8 of 12