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.

Retries with Delays<br />

Dequeue Features<br />

A message must be consumed exactly once. If an attempt to dequeue a message<br />

fails and the transaction is rolled back, the message will be made available for<br />

reprocessing after some user-specified delay elapses. Reprocessing will be<br />

attempted up to the user-specified limit.<br />

To see this feature applied in the context of the BooksOnLine scenario, refer to<br />

"Retry with Delay Interval" on page 8-77.<br />

Optional Transaction Protection<br />

Exception Handling<br />

ENQUEUE and DEQUEUE requests are normally part of a transaction that contains the<br />

requests, thereby providing the desired transactional behavior. You can, however,<br />

specify that a specific request is a transaction by itself, making the result of that<br />

request immediately visible to other transactions. This means that messages can be<br />

made visible to the external world as soon as the ENQUEUE or DEQUEUE statement is<br />

issued or after the transaction is committed.<br />

A message may not be consumed within given constraints, such as within the<br />

window of execution or within the limits of the retries. If such a condition arises, the<br />

message will be moved to a user-specified exception queue.<br />

To see this feature applied in the context of the BooksOnLine scenario, refer to<br />

"Exception Handling" on page 8-80.<br />

Listen Capability (Wait on Multiple Queues)<br />

The listen call is a blocking call that can be used to wait for messages on multiple<br />

queues. It can be used by a gateway application to monitor a set of queues. An<br />

application can also use it to wait for messages on a list of subscriptions. If the listen<br />

returns successfully, a dequeue must be used to retrieve the message.<br />

To see this feature applied in the context of the BooksOnLine scenario, refer to<br />

"Listen Capability" on page 8-90.<br />

Dequeue Message Header with No Payload<br />

The dequeue mode REMOVE_NODATA can be used to remove a message from a<br />

queue without retrieving the payload. Use this mode to delete a message with a<br />

large payload whose content is irrelevant.<br />

Introduction to <strong>Oracle</strong> <strong>Advanced</strong> <strong>Queuing</strong> 1-19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!