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.

JMS Message Producer Features<br />

JMS Message Producer Features<br />

Priority and Ordering of Messages<br />

Time Specification - Delay<br />

Time Specification - Expiration<br />

Message Grouping<br />

Priority and Ordering of Messages<br />

The message ordering dictates the order in which messages will be received from a<br />

queue or topic. The ordering method is specified when the queue table for the<br />

queue or topic is created (see "Creating a Queue Table" in Chapter 9,<br />

"Administrative Interface"). Currently, AQ supports ordering on two of the message<br />

attributes:<br />

Priority<br />

Enqueue time<br />

When combined, they lead to four possible ways of ordering:<br />

FIFO Ordering of Messages If enqueue time was chosen as the ordering criteria,<br />

then messages are received in the order of the enqueue time. The enqueue time is<br />

assigned to the message by AQ at message publish/send time. This is also the<br />

default ordering.<br />

Priority Ordering of Messages If priority ordering is chosen, each message will be<br />

assigned a priority. Priority can be specified as a message property at publish/send<br />

time by the Message Producer. The messages will be received in the order of the<br />

priorities assigned.<br />

First-In, First-Out (FIFO) Priority Ordering A FIFO-priority topic/queue can also<br />

be created by specifying both the priority and the enqueue time as the sort order of<br />

the messages. A FIFO-priority topic/queue behaves like a priority queue, except if<br />

two messages are assigned the same priority, they will be received in the order of<br />

their enqueue time.<br />

Enqueue Time Followed by Priority Messages with the same enqueue time will<br />

be received according to their priorities. If the ordering criteria of two message is<br />

the same, then the order they are received is indeterminate. However, AQ does<br />

ensure that messages send/published in the same session with the same ordering<br />

criteria will be received in the order they were sent.<br />

12-56 <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!