Вы находитесь на странице: 1из 12

Introduction to Oracle Advanced Queue

Release Version 0.1

Tata Consultancy Services Bangalore

Prepared By Rakesh P.A

DOCUMENT RELEASE NOTICE


Client: Yahoo Project: APG Document details: Introduction to Oracle Advanced Queue Name Introduction to Oracle Advanced Queue Release Version No. 0.1 Description 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 : Authorized by : Date: Date:

Introduction to Oracle Advanced Queue

Release Version 0.1

DOCUMENT REVISION LIST


Client Project Document Name : Yahoo : APG : Introduction to Oracle Advanced Queue

Release Notice Reference (for release): Release Version 0.1

Re v. N o. 1

Revision Date January 4th 2012

Revision Descriptio n Initial version

Page No. All pages

Previous Page No.

Action Taken

Addenda/ New Page

Release Notice Ref. 0.1

Tata Consultancy Services

Internal Use Only

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

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 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.

2. Oracle Advanced Queue


2.1. Overview

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.

Tata Consultancy Services

Internal Use Only

Page 1 of 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

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 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.

Tata Consultancy Services

Internal Use Only

Page 3 of 12

Introduction to Oracle Advanced Queue

Release Version 0.1

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.

Fig (c) Queue-to-Queue Transmission

Tata Consultancy Services

Internal Use Only

Page 4 of 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 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.

Fig (d) Queue-to-Queue Transmission

Tata Consultancy Services

Internal Use Only

Page 5 of 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 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.

Tata Consultancy Services

Internal Use Only

Page 6 of 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 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-

Tata Consultancy Services

Internal Use Only

Page 7 of 12

Introduction to Oracle Advanced Queue

Release Version 0.1

cal information, less management and more productivity for your ever growing, scalable, highly available business.

Tata Consultancy Services

Internal Use Only

Page 8 of 12

Вам также может понравиться