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.

JMS Publish-Subscribe Model Features<br />

JMSPriority < 3 AND JMSCorrelationID = ’Fiction’<br />

JMS Message header fields or properties:<br />

color IN (’RED’, BLUE’, ’GREEN’) AND price < 30000<br />

User-defined message properties:<br />

For topics containing AdtMessages the selector must be a SQL expression on the<br />

message payload contents or priority or correlationID.<br />

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

<br />

priority < 3 AND corrid = ’Fiction’<br />

Selector on message payload is specified as follows<br />

<br />

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

The syntax for the selector is described in detail in <strong>Oracle</strong>9i Supplied Java Packages<br />

Reference, createDurableSubscriber.<br />

Remote subscribers are defined using the createRemoteSubscriber call.The<br />

remote subscriber may be a specific consumer at the remote topic or all subscribers<br />

at the remote topic<br />

A remote subscriber is defined using the AQjmsAgent structure. An AQjmsAgent<br />

consists of a name and address. The name refers to the consumer_name at the<br />

remote topic. The address refers to the remote topic:<br />

.[@dblink]<br />

To publish messages to a particular consumer at the remote topic, the<br />

<br />

subscription_name of the recipient at the remote topic must be specified in<br />

the name field of AQjmsAgent. The remote topic must be specified in the<br />

address field of AQjmsAgent.<br />

To publish messages to all subscribers of the remote topic, the name field of<br />

<br />

AQjmsAgent must be set to null. The remote topic must be specified in the<br />

address field of AQjmsAgent.<br />

In the BooksOnline application there is one local subscriber SUBS1 and two remote<br />

subscribers -<br />

West_Shipping at the remote topic WS.WS_bookedorders_topic<br />

East_Shipping at ES.ES_booked_orders_topic<br />

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