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.

Propagation Features<br />

Propagation Scheduling<br />

A propagation schedule is defined for a pair of source and destination queues. If a<br />

queue has messages to be propagated to several queues, a schedule has to be<br />

defined for each of the destination queues. A schedule indicates the time frame<br />

during which messages can be propagated from the source queue. This time frame<br />

may depend on a number of factors such as network traffic, load at source database,<br />

load at destination database, and so on. The schedule therefore has to be tailored for<br />

the specific source and destination. When a schedule is created, a job is<br />

automatically submitted to the job_queue facility to handle propagation.<br />

The administrative calls for propagation scheduling provide flexibility for<br />

managing the schedules (see "Scheduling a Queue Propagation" in Chapter 9,<br />

"Administrative Interface"). The duration or propagation window parameter of a<br />

schedule specifies the time frame during which propagation has to take place. If the<br />

duration is unspecified, the time frame is an infinite single window. If a window<br />

has to be repeated periodically, a finite duration is specified along with a next_<br />

time function that defines the periodic interval between successive windows.<br />

The latency parameter for a schedule is relevant only when a queue does not have<br />

any messages to be propagated. This parameter specifies the time interval within<br />

which a queue has to be rechecked for messages. Note that if the latency is less than<br />

5 seconds, then the job_queue_interval parameter for the job queue processes<br />

should be less than or equal to the latency parameter.<br />

The propagation schedules defined for a queue can be changed or dropped at<br />

anytime during the life of the queue. In addition there are calls for temporarily<br />

disabling a schedule (instead of dropping the schedule) and enabling a disabled<br />

schedule. A schedule is active when messages are being propagated in that<br />

schedule. All the administrative calls can be made irrespective of whether the<br />

schedule is active or not. If a schedule is active, it will take a few seconds for the<br />

calls to be executed.<br />

Scenario<br />

In the BooksOnLine example, messages in the OE_bookedorders_que are<br />

propagated to different shipping sites. The following example code illustrates the<br />

various administrative calls available for specifying and managing schedules. It also<br />

shows the calls for enqueuing messages into the source queue and for dequeuing<br />

the messages at the destination site. The catalog view USER_QUEUE_SCHEDULES<br />

provides all information relevant to a schedule (see "Selecting Propagation<br />

Schedules in User Schema" in Chapter 10, "Administrative Interface: Views").<br />

8-108 <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!