32.3 SDO_TRKR.GET_NOTIFICATION_MSG
Format
SDO_TRKR.GET_NOTIFICATION_MSG( tracking_set_name IN VARCHAR2, deq_wait IN NUMBER(38) DEFAULT DBMS_AQ.NO_WAIT, message OUT NOTIFICATION_MSG);
Description
Gets the next notification message from the tracking sets notification queue.
Parameters
- tracking_set_name
-
Name of the tracking set. This parameter is used to build the name of the notification queue.
- deq_set_wait
-
Number of seconds to wait for a message to arrive on the notification queue if no message matching the search criteria is not already on the queue. The DEFAULT for this parameter is DBMS_AQ.NO_WAIT, which means that the operation does not wait.
- message
-
Output parameter of type NOTIFICATION_MSG. The next message from the notification queue, or null if the wait time expired.
Usage Notes
For conceptual and usage information about the location tracking server, see Location Tracking Server.
Examples
The following example gets a notification message from the tracking sets notification queue and inserts the contents of the message into the tracking set auxiliary notification table. It will continue to get notification messages until it waits for 30 seconds with no messages arriving.
... LOOP SDO_TRKR.GET_NOTIFICATION_MSG( tracking_set_name => 'TRACKING_EXAMPLE', message => message, deq_wait =>30); IF (message IS NULL) THEN EXIT; END IF; INSERT INTO tracking_example_notifications (object_id, region_id, time, x, y, state) VALUES (message.object_id, message.region_id, message.time, message.x, message.y, message.state); END LOOP; ...
Parent topic: SDO_TRKR Package (Location Tracking)