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.

Modeling Queue Entities<br />

Message Propagation<br />

notification for message delivery. Application C registers for messages on the<br />

queue. When messages arrive, application C is notified and can dequeue the<br />

messages.<br />

Fanning-Out of Messages<br />

In AQ, message recipients can be either consumers or other queues. If the message<br />

recipient is a queue, the actual recipients are determined by the subscribers to the<br />

queue (which may in turn be other queues). Thus it is possible to fan-out messages<br />

to a large number of recipients without requiring them all to dequeue messages<br />

from a single queue.<br />

For example, a queue, Source, may have as its subscribers queues dispatch1@dest1<br />

and dispatch2@dest2. Queue dispatch1@dest1 may in turn have as its subscribers the<br />

queues outerreach1@dest3 and outerreach2@dest4, while queue dispatch2@dest2 has as<br />

subscribers the queue outerreach3@dest21 and outerreach4@dest4. In this way,<br />

messages enqueued in Source will be propagated to all the subscribers of four<br />

different queues.<br />

Compositing (Funneling)<br />

You can also combine messages from different queues into a single queue,<br />

sometimes described as compositing. For example, if queue composite@endpoint is a<br />

subscriber to both funnel1@source1 and funnel2@source2, then the subscribers to<br />

composite@endpoint can get all messages enqueued in those queues as well as<br />

messages enqueued directly to itself.<br />

Propagation and <strong>Advanced</strong> <strong>Queuing</strong><br />

Figure 7–10 illustrates applications on different databases communicating using<br />

AQ. Each application has an inbox and an outbox for handling incoming and<br />

outgoing messages. An application enqueues a message into its outbox irrespective<br />

of whether the message is sent locally (on the same node) or remotely (on a<br />

different node ). An application dequeues messages from its inbox irrespective of<br />

7-14 <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!