Your browser does not support JavaScript. This help page requires JavaScript to render correctly.
Skip Headers
Previous
Previous
 
Next
Next

Task 4: Configuring Message Notification

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: 

  1. 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.

  2. 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;
    /
    
  3. Complete the steps in "Task 5: Enqueuing Messages and Checking for Message Notification" to continue this extended example.

Related Topics

Tutorial: Configuring Message Notifications

About Messaging