09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Elements of <strong>Advanced</strong> <strong>Queuing</strong><br />

Queue<br />

Queue Table<br />

Agent<br />

The control information represents message properties used by AQ to manage<br />

messages. The payload data is the information stored in the queue and is<br />

transparent to <strong>Oracle</strong> AQ. A message can reside in only one queue. A message is<br />

created by the enqueue call and consumed by the dequeue call.<br />

A queue is a repository for messages. There are two types of queues: user queues,<br />

also known as normal queues, and exception queues. The user queue is for normal<br />

message processing. Messages are transferred to an exception queue if they cannot<br />

be retrieved and processed for some reason. Queues can be created, altered, started,<br />

stopped, and dropped by using the <strong>Oracle</strong> AQ administrative interfaces. Refer to<br />

Chapter 9, "Administrative Interface" for more information.<br />

User queues can be persistent (the default) or nonpersistent queues. Persistent<br />

queues store messages in database tables. These queues provide all the reliability<br />

and availability features of database tables. Nonpersistent queues store messages in<br />

memory. They are generally used to provide an asynchronous mechanism to send<br />

notifications to all users that are currently connected.<br />

Queues are stored in queue tables. Each queue table is a database table and contains<br />

one or more queues. Each queue table contains a default exception queue.<br />

Figure 7–1, "Basic Queues" on page 7-2 shows the relationship between messages,<br />

queues, and queue tables.<br />

An agent is a queue user. This can be an end user or an application. There are two<br />

types of agents:<br />

Producers who place messages in a queue (enqueuing)<br />

Consumers who retrieve messages (dequeuing)<br />

Any number of producers and consumers may be accessing the queue at a given<br />

time. Agents insert messages into a queue and retrieve messages from the queue by<br />

using the <strong>Oracle</strong> AQ operational interfaces. Refer to Chapter 11, "Operational<br />

Interface: Basic Operations" for more information.<br />

An agent is identified by its name, address and protocol. Refer to "Agent Type<br />

(aq$_agent)" on page 2-3 in Chapter 2, "Basic Components" for a formal description<br />

of this data structure.<br />

1-22 <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!