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.

Creating a Durable Subscriber for an ADT Topic with Selector<br />

See Also:<br />

Table 15–1 for a list of publish-subscribe basic operations in the<br />

<br />

JMS operational interface<br />

"Class - oracle.jms.AQjmsSession" on page B-53<br />

"Creating a Durable Subscriber for an ADT Topic without<br />

<br />

Selector" on page 15-29<br />

Purpose<br />

Create a durable subscriber for an ADT topic with selector.<br />

Usage Notes<br />

To create a durable subscriber for a Topic of <strong>Oracle</strong> Object type, the client needs to<br />

specify the CustomDatumFactory for the <strong>Oracle</strong> Object Type in addition to the<br />

Topic and subscriber name.<br />

Optionally, a message selector may be specified. Only messages matching the<br />

selector will be delivered to the subscriber.<br />

ADT messages do not contain any user defined properties. However, the selector<br />

can be used to select messages based on priority or correlation id or attribute values<br />

of the message payload<br />

The syntax for the selector for queues containing ADT messages is different from<br />

the syntax for selectors on queues containing standard JMS payloads (text, stream,<br />

object, bytes, map)<br />

The selector is similar to the AQ rules syntax<br />

a. Selector on priority or correlation is specified as follows<br />

For example.:- priority > 3 AND corrid = 'Fiction'<br />

b. Selector on message payload is specified as follows. The attribute<br />

name must be prefixed with tab.user_data.<br />

For example:tab.user_data.color<br />

= 'GREEN' AND tab.user_data.price < 30000<br />

Syntax<br />

Java (JDBC): <strong>Oracle</strong>9i Supplied Java Packages Reference oracle.jms,<br />

AQjmsSession.createDurableSubscriber<br />

15-32 <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!