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.

end;<br />

Working with Messaging Gateway<br />

Subscribers and schedules can be altered whether or not the Messaging Gateway<br />

agent is running.<br />

Removing Subscribers and Schedules<br />

In general, you should remove subscribers when the Messaging Gateway agent is<br />

running so that it can perform cleanup activities such as cleaning log queues and<br />

removing non-<strong>Oracle</strong> messaging system subscribers.<br />

Removing a Schedule and Subscriber: Example<br />

begin<br />

dbms_mgwadm.unschedule_propagation(‘sch_aq2mq’);<br />

end;<br />

begin<br />

dbms_mgwadm.remove_subscriber(‘sub_aq2mq’, dbms_mgwadm.NO_FORCE);<br />

end;<br />

The second argument specifies whether this procedure should succeed even if the<br />

gateway is not able to perform all cleanup actions pertaining to this subscriber.<br />

Valid values are DBMS_MGWADM.NO_FORCE and DBMS_MGWADM.FORCE. If DBMS_<br />

MGWADM.NO_FORCE is specified, and the Messaging Gateway agent is not running,<br />

the subscriber is placed in a DELETE_PENDING state. Cleanup actions will occur<br />

when the Messaging Gateway agent is started. If DBMS_MGWADM.FORCE is<br />

specified, the procedure will succeed, although all cleanup actions may not be done.<br />

Selection Rules<br />

A selection rule specifies an optional subscriber rule for selecting which messages<br />

are dequeued from the messaging system. For <strong>Advanced</strong> <strong>Queuing</strong>, the rule<br />

corresponds to the AQ subscriber rule. Selection rules are not used for MQSeries.<br />

Using Transformations<br />

Many applications of Messaging Gateway require you to provide a transformation.<br />

For Messaging Gateway to propagate messages from an AQ queue with an<br />

arbitrary ADT payload, a mapping must be provided to a Messaging Gateway<br />

canonical ADT. Likewise, for Messaging Gateway to propagate messages to an AQ<br />

queue with an arbitrary ADT payload, a mapping must be provided from a<br />

Messaging Gateway canonical ADT. This is the job of the transformation. A<br />

transformation registered with an outbound subscriber is invoked by AQ when<br />

Messaging Gateway 18-23

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

Saved successfully!

Ooh no, something went wrong!