Previous |
Next |
In this extended example, message notification invokes the strmadmin.dequeue_app_messages
procedure when a new message is enqueued into the strmadmin.streams_queue
queue. This procedure dequeues the new message or messages. After dequeuing, an application can process the messages in any customized way. In this example, the second application uses the information in the messages to set application parameter values. For simplicity, this example does not configure the second application.
To configure message notification that invokes a procedure:
On a command line, open SQL*Plus and connect to the database as the Oracle Streams administrator.
See Starting SQL*Plus and Connecting to the Database for more information about starting SQL*Plus.
Set the message notification to invoke the strmadmin.dequeue_app_messages
procedure when messages are enqueued and they can be dequeued by the strmadmin
messaging client:
BEGIN DBMS_STREAMS_ADM.SET_MESSAGE_NOTIFICATION ( streams_name => 'strmadmin', notification_action => 'strmadmin.dequeue_app_messages', notification_type => 'PROCEDURE', include_notification => TRUE, queue_name => 'strmadmin.streams_queue'); END; /
Complete the steps in "Task 5: Enqueuing Messages and Checking for Message Notification" to continue this extended example.