Previous |
Next |
The example in "Task 5: Enqueuing Messages" enqueues messages into the strmadmin.streams_queue
queue in the ii1.example.com
database. After messages are enqueued, the propagation configured in "Task 2: Configuring the Queues and Propagation Between Them" sends the messages to the strmadmin.streams_queue
queue in the ii2.example.com
database.
This example dequeues the messages from the queue in the ii2.example.com
database using the dequeue_orders
procedure created in "Task 4: Configuring a Messaging Client to Dequeue Messages".
To dequeue messages:
Optionally, check to see if the messages have arrived in the strmadmin.streams_queue
queue at ii2.example.com
before you attempt to dequeue them. It might take time for the propagation to send messages from the queue at ii1.example.com
to the queue at ii2.example.com
. See "Viewing the Messages in a Queue" for instructions.
Three messages should appear on the Messages page. Each message contains information about an order you inserted into the oe.orders
table in "Task 5: Enqueuing Messages".
On a command line, open SQL*Plus and connect to the ii2.example.com
database as the Oracle Streams administrator.
See Starting SQL*Plus and Connecting to the Database for more information about starting SQL*Plus.
In SQL*Plus, run the dequeue_orders
procedure:
SET SERVEROUTPUT ON exec dequeue_orders;
The output will be similar to the following:
Order ID: 3000 Order Date: 01-FEB-07 01.47.48.000000000 PM Order ID: 3001 Order Date: 01-FEB-07 01.47.57.000000000 PM Order ID: 3002 Order Date: 01-FEB-07 01.48.04.000000000 PM No more messages. PL/SQL procedure successfully completed.