Upload
rakesh-perne-achutha
View
217
Download
0
Embed Size (px)
Citation preview
8/2/2019 Introduction to Oracle Advanced Queue
1/12
Introduction to OracleAdvanced Queue
Release Version 0.1
Tata Consultancy ServicesBangalore
Prepared
By
Rakesh P.A
8/2/2019 Introduction to Oracle Advanced Queue
2/12
DOCUMENT RELEASE NOTICE
Client: Yahoo
Project: APG
Document details: Introduction to Oracle Advanced Queue
Name ReleaseVersion
Description
Introduction to Oracle
Advanced Queue
0.1 This document is an 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 : Date:
Authorized by : Date:
8/2/2019 Introduction to Oracle Advanced Queue
3/12
Introduction to Oracle Advanced Queue Release Version 0.1
DOCUMENT REVISION LIST
Client :Yahoo
Project : APG
Document Name : Introduction to Oracle Advanced Queue
Release Notice Reference (for release): Release Version 0.1
Rev.N
RevisionDate
RevisionDescription
PageNo.
PreviousPageNo.
ActionTaken
Addenda/New Page
ReleaseNotice Ref.
1 January4th 2012
Initialversion
Allpages
0.1
Tata Consultancy Services Internal Use Only
8/2/2019 Introduction to Oracle Advanced Queue
4/12
Introduction to Oracle Advanced Queue Release Version 0.1
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
Tata Consultancy Services Internal Use Only
8/2/2019 Introduction to Oracle Advanced Queue
5/12
Introduction to Oracle Advanced Queue Release Version 0.1
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 messagesto different systems. Message queuing functionality is natively used insidethe database. AQ leverages this Message queuing functionality. AQprovides easy manageability, high availability, high performance andsecurity. AQ supports point-to-point and publish/subscribe queues,persistent and buffered messaging, and message ordering priorities thatoffer 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 OracleAdvanced Queue.
2. Oracle Advanced Queue
2.1. Overview
Producer applications enqueue messages and consumer applicationsdequeue messages. At the most basic level of queuing, one producerenqueues one or more messages into one queue. Each message isdequeued 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 definesproperties of queue. Queue table are reported in DBA_QUEUE_TABLES.Queue tables are managed using DBMS_AQADM.
Tata Consultancy Services Internal Use Only Page 1 of 12
http://www.orafaq.com/wiki/Oracle_8http://www.orafaq.com/wiki/Oracle_Streamshttp://www.orafaq.com/wiki/Oracle_Streamshttp://www.orafaq.com/wiki/Oracle_88/2/2019 Introduction to Oracle Advanced Queue
6/12
Introduction to Oracle Advanced Queue Release Version 0.1
There are four types of queues:
1) Single Consumer Queue
2) Multiple-Consumer Queue
3) Buffered Queue
4) Persistent Queue
2.3.1. Single Consumer Queue
Fig (a) Single Consumer Queue
Tata Consultancy Services Internal Use Only Page 2 of 12
8/2/2019 Introduction to Oracle Advanced Queue
7/12
Introduction to Oracle Advanced Queue Release Version 0.1
2.3.2. Multiple-Consumer Queue
Fig (b) 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 imple-mentation. Buffered messaging is faster than persistent messaging,because its messages reside in shared memory. They are usuallywritten to disk only when the total memory consumption of bufferedmessages approaches the available shared memory limit. Bufferedmessaging is ideal for applications that do not require the reliabilityand transaction support of Oracle Streams AQ persistent messaging.
Tata Consultancy Services Internal Use Only Page 3 of 12
8/2/2019 Introduction to Oracle Advanced Queue
8/12
Introduction to Oracle Advanced Queue Release Version 0.1
The portion of a queue that stores buffered messages in memory issometimes referred to as a buffered queue. Message retention isnot supported for buffered messaging.
2.3.4. Persistent Queue
When persistent messages are enqueued, they are stored in data-base tables. The performance characteristics ofqueue operations onpersistent messages are similar to underlying database operations.The code path of an enqueue operation is comparable to SE-LECT and INSERT into a multicolumn queue table with three index-organized tables. The code path of a dequeue operation is compara-ble to a SELECT operation on the multi-column table anda DELETE operation on the dequeue index-organized table. In manyscenarios, for example when Oracle Real Application Clusters (Ora-
cle RAC) is not used and there is adequate streams pool memory,the dequeue operation is optimized and is comparable to a SE-LECT operation on a multi-column table.
2.4. Queue-to-Queue Transmission:
The technique for transmitting the messages from one queue to another iscalledPropagation. There are various usages for propagation.
Fig (c) Queue-to-Queue Transmission
Tata Consultancy Services Internal Use Only Page 4 of 12
http://blog.ronnyegner-consulting.de/wp-content/uploads/oracle_docs/DB_11gR2/server.112/e11013/glossary.htm#CBAHIIABhttp://blog.ronnyegner-consulting.de/wp-content/uploads/oracle_docs/DB_11gR2/server.112/e11013/glossary.htm#CBAJCGCHhttp://blog.ronnyegner-consulting.de/wp-content/uploads/oracle_docs/DB_11gR2/server.112/e11013/glossary.htm#CBAFHDDDhttp://blog.ronnyegner-consulting.de/wp-content/uploads/oracle_docs/DB_11gR2/server.112/e11013/glossary.htm#CBAGEGIFhttp://blog.ronnyegner-consulting.de/wp-content/uploads/oracle_docs/DB_11gR2/server.112/e11013/glossary.htm#CBAHIIABhttp://blog.ronnyegner-consulting.de/wp-content/uploads/oracle_docs/DB_11gR2/server.112/e11013/glossary.htm#CBAJCGCHhttp://blog.ronnyegner-consulting.de/wp-content/uploads/oracle_docs/DB_11gR2/server.112/e11013/glossary.htm#CBAFHDDDhttp://blog.ronnyegner-consulting.de/wp-content/uploads/oracle_docs/DB_11gR2/server.112/e11013/glossary.htm#CBAGEGIF8/2/2019 Introduction to Oracle Advanced Queue
9/12
Introduction to Oracle Advanced Queue Release Version 0.1
2.4.1. Fanning-Out Messages
This technique is normally used in case of multi-database architec-ture where load balancing of message sending has to be achieved.Whenever message is enqueued in HQ queue, it is propagated toRegional 1 and 2 queues. The Regional 1 and 2 queues in turn willpropagate the messages to their respective subscribers. There arerule based propagations that makes this happen.
Fig (d) Queue-to-Queue Transmission
Tata Consultancy Services Internal Use Only Page 5 of 12
8/2/2019 Introduction to Oracle Advanced Queue
10/12
Introduction to Oracle Advanced Queue Release Version 0.1
2.4.2. Funneling-In Messages
The other technique of propagating messages is the reverse of fan-ning. Here the Users will be propagating messages to Regional andit in turn will propagate to HQ queue. This method is called Funnel-ing in messages.
Tata Consultancy Services Internal Use Only Page 6 of 12
8/2/2019 Introduction to Oracle Advanced Queue
11/12
Introduction to Oracle Advanced Queue Release Version 0.1
Fig (e) Queue-to-Queue Transmission
3. Conclusion
Oracle Advanced Queuing, built into the Oracle Database, offers a robustplatform to standardize and integrate the various technologies and applica-
tions inside the datacenter. Businesses can leverage the AQs enterprisemessaging infrastructure to build highly scalable and reliable distributedapplications. Powerful AQ features such as differing qualities of service, au-tomatic message transformations, and propagations give businesses thetools needed to design a powerful and flexible messaging platform. Data-base integrated Advanced Queuing provides smooth, real-time flow of criti-
Tata Consultancy Services Internal Use Only Page 7 of 12
8/2/2019 Introduction to Oracle Advanced Queue
12/12
Introduction to Oracle Advanced Queue Release Version 0.1
cal information, less management and more productivity for your evergrowing, scalable, highly available business.
Tata Consultancy Services Internal Use Only Page 8 of 12