Oracle DBMS_STREAMS_MESSAGING
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
"I spent my entire adult life looking out for the well-being, the training, the equipping of the troops for whom I was responsible. I will not be lectured about what our military needs by a five-deferment draft dodger,"
~ Sen. Tammy Duckworth
Purpose API for Streams to perform messaging using AQ
AUTHID CURRENT_USER
Constants
Name Data Type Value
forever PLS_INTEGER -1
no_wait PLS_INTEGER 0
Dependencies (Updated to 12.2.0.1)
ANYDATA DBMS_LOGREP_UTIL DBMS_STREAMS_ADM
AQ$_AGENT DBMS_STANDARD DBMS_UTILITY
DBMS_AQ    
Documented No
Exceptions
Error Code Reason
ORA-25228 No more messages (nomoremsgs)
ORA-25235 End of current transaction (endofcurtrans)
First Available Not known
Security Model Owned by SYS with EXECUTE granted to the EXECUTE_CATALOG_ROLE role
Source {ORACLE_HOME}/rdbms/admin/dbmsstr.sql
Subprograms
 
DEQUEUE
Dequeue a Streams AQ message

dequeue_mode: one of 'REMOVE', 'LOCKED', 'BROWSE'.
navigation: one of 'FIRST MESSAGE', 'NEXT MESSAGE', 'NEXT TRANSACTION'
dbms_streams_messaging.dequeue(
queue_name   IN  VARCHAR2,
streams_name IN  VARCHAR2,
payload      OUT SYS.ANYDATA,
dequeue_mode IN  VARCHAR2       DEFAULT 'REMOVE',
navigation   IN  VARCHAR2       DEFAULT 'NEXT MESSAGE',
wait         IN  BINARY_INTEGER DEFAULT FOREVER);
DECLARE
 ad_msg sys.anyData;
BEGIN
  dbms_streams_messaging.dequeue('SCOTT_CAPTURE_Q', 'SCOTT_REP', ad_msg);
END;
/
Overload 2 dbms_streams_messaging.dequeue(
queue_name   IN  VARCHAR2,
streams_name IN  VARCHAR2,
payload      OUT SYS.ANYDATA,
dequeue_mode IN  VARCHAR2       DEFAULT 'REMOVE',
navigation   IN  VARCHAR2       DEFAULT 'NEXT MESSAGE',
wait         IN  BINARY_INTEGER DEFAULT FOREVER,
msgid        OUT RAW);
DECLARE
 ad_msg sys.anyData;
 mid    RAW;
BEGIN
  dbms_streams_messaging.dequeue('SCOTT_CAPTURE_Q', 'SCOTT_REP', ad_msg, 'BROWSE', 'FIRST_MESSAGE', 'FOREVER', mid);
END;
/
 
ENQUEUE
Enqueue a Streams AQ message dbms_streams_messaging.enqueue(
queue_name IN VARCHAR2,
payload    IN sys.anydata);
DECLARE
 msg sys.anydata := sys.anyData.convertVarchar2('hello world'))
BEGIN
  dbms_streams_messaging.enqueue('SCOTT_CAPTURE_Q', msg);
END;
/
Overload 2 dbms_streams_messaging.enqueue(
queue_name IN  VARCHAR2,
payload    IN  sys.anydata,
msgid      OUT RAW);
DECLARE
 msg sys.anydata := sys.anyData.convertVarchar2('hello world');
 mid RAW;
BEGIN
  dbms_streams_messaging.enqueue('SCOTT_CAPTURE_Q', msg);
  dbms_output.put_line(mid);
END;
/

Related Topics
ANYDATA
DBMS_STREAMS
DBMS_STREAMS_ADM
DBMS_STREAMS_ADM_UTL_INT
DBMS_STREAMS_ADVISOR_ADM
DBMS_STREAMS_AUTH
DBMS_STREAMS_CDC_ADM
DBMS_STREAMS_CONTROL_ADM
DBMS_STREAMS_HANDLER_ADM
DBMS_STREAMS_MC
DBMS_STREAMS_MC_INV
DBMS_STREAMS_PUB_RPC
DBMS_STREAMS_RPC_INTERNAL
DBMS_STREAMS_TABLESPACE_ADM
Packages
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved