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 Propagation<br />

Remote Subscribers<br />

Enhanced Propagation Scheduling Capabilities<br />

Exception Handling During Propagation<br />

This feature enables applications to communicate with each other without having to<br />

be connected to the same database.<br />

AQ allows a remote subscriber, that is a subscriber at another database, to subscribe<br />

to a topic. When a message published to the topic meets the criterion of the remote<br />

subscriber, AQ will automatically propagate the message to the queue/topic at the<br />

remote database specified for the remote subscriber.<br />

The snapshot (job_queue) background process performs propagation.<br />

Propagation is performed using database links and <strong>Oracle</strong> Net Services.<br />

There are two ways to implement remote subscribers:<br />

The createRemoteSubscriber method can be used to create a remote<br />

<br />

subscriber to/on the topic. The remote subscriber is specified as an instance of<br />

the class AQjmsAgent.<br />

The AQjmsAgent has a name and an address. The address consists of a<br />

<br />

queue/topic and the database link (dblink) to the database of the subscriber.<br />

There are two kinds of remote subscribers:<br />

Case 1 The remote subscriber is a topic. This occurs when no name is specified for<br />

the remote subscriber in the AQjmsAgent object and the address is a topic. The<br />

message satisfying the subscriber’s subscription is propagated to the remote topic.<br />

The propagated message is now available to all the subscriptions of the remote<br />

topic that it satisfies.<br />

Case 2 Specify a specific remote recipient for the message. The remote subscription<br />

can be for a particular consumer at the remote database. If the name of the remote<br />

recipient is specified (in the AQjmsAgent object), then the message satisfying the<br />

subscription is propagated to the remote database for that recipient only. The<br />

recipient at the remote database uses the TopicReceiver interface to retrieve its<br />

messages. The remote subscription can also be for a point-to-point queue<br />

Example Scenario for Case 1<br />

Assume the order entry application and Western region shipping application are on<br />

different databases, db1 and db2. Further assume that there is a dblink dblink_<br />

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