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.

Working with Messaging Gateway<br />

The native name of the non-<strong>Oracle</strong> queue (its name in the non-<strong>Oracle</strong><br />

<br />

messaging system)<br />

Whether it is a queue (point-to-point) or topic (publish-subscribe)<br />

A set of options specific to the non-<strong>Oracle</strong> messaging system. These options are<br />

<br />

a set of {name, value} pairs, both of which are strings.<br />

For MQSeries the only option is ‘MQ_openOptions’. This property corresponds<br />

to the openOptions argument of the MQSeries Base Java<br />

MQQueueManager.accessQueue method. If not specified, the value of<br />

openOptions defaults to MQC.MQOO_OUTPUT on enqueue and MQC.MQOO_<br />

INPUT_SHARED on dequeue.<br />

-- Registering non-<strong>Oracle</strong> queue<br />

-declare<br />

v_options sys.mgw_properties;<br />

begin<br />

-- No options set for this foreign queue. Below is a sample of how one would<br />

be set.<br />

-- v_options := sys.mgw_properties(sys.mgw_property(‘MQ_openOptions’,<br />

‘2066’));<br />

-- Register the queue<br />

dbms_mgwadm.register_foreign_queue(<br />

name => 'destq', -- MGW non-<strong>Oracle</strong> queue name<br />

linkname => 'mqlink', -- name of link to use<br />

provider_queue => 'my_mq_queue', -- name of MQSeries queue<br />

domain => dbms_mgwadm.DOMAIN_QUEUE, -- single consumer queue<br />

options => v_options);<br />

end;<br />

The domain parameter is set to DBMS_MGWADM.DOMAIN_QUEUE for point-to-point<br />

queues and DBMS_MGWADM.DOMAIN_TOPIC for publish-subscribe queues. Only<br />

point-to-point queues are supported for MQSeries.<br />

Altering a Registered Queue<br />

After a non-<strong>Oracle</strong> queue is configured and registered, it cannot be altered. The<br />

registration information must be deleted and re-created.<br />

Unregistering a Non-<strong>Oracle</strong> Queue<br />

A non-<strong>Oracle</strong> queue can be unregistered only if there are no subscribers or<br />

schedules referencing it.<br />

Messaging Gateway 18-19

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

Saved successfully!

Ooh no, something went wrong!