Use Persistent Messaging with Messages Stored in Cloud Object Store
The
DBMS_PIPE package has extended functionality on Autonomous AI Database to support persistent
messaging, where messages are stored in Cloud Object Store.
About Persistent Messaging with DBMS_PIPE
DBMS_PIPE allows one or more database
sessions to communicate in the same region or across regions with messages that are
stored in Cloud Object Store.
Persistent messages in DBMS_PIPE:
-
Allow you to send and retrieve very large messages.
-
Support a sending a large number of pipe messages.
-
Support sending and receiving messages within a single database, across multiple databases and across databases in different regions.
-
Support multiple pipes using the same Cloud Object Store location URI.
Persistent messaging pipes can be created in any of the supported
DBMS_PIPE types:
- Implicit Pipe: Automatically created when a message is sent with
an unknown pipe name using the
DBMS_PIPE.SEND_MESSAGEfunction. - Explicit Pipe: Created using the
DBMS_PIPE.CREATE_PIPEfunction with a user specified pipe name. - Public Pipe: Accessible by any user with
EXECUTEpermission onDBMS_PIPEpackage. - Private Pipe: Accessible by sessions with the same user as the pipe creator.
Note:
Oracle recommends creating an explicit pipe before you send or receive messages with persistent messaging. Creating an explicit pipe withDBMS_PIPE.CREATE_PIPE ensures that the pipe is created with
the access permissions you want, either public or private (by setting the
private parameter).
The following shows the general workflow for DBMS_PIPE with
persistent messaging:
Create an Explicit Persistent Pipe and Send a Message
Describes the steps to create a persistent pipe with a specified pipe name (Explicit Pipe).
Retrieve a Persistent Message on Same Database
Describes the steps to retrieve a persistent message from an explicit pipe on the same Autonomous AI Database instance (the instance where the message was sent).
On an Autonomous AI Database
instance you can receive messages sent to a pipe from a different session. The
DBMS_PIPE procedures are invoker's rights procedures and run as
the current invoked user.
Private pipes are owned by the current user that creates the pipe. Private pipes can only be accessed by the same user that created the pipe. This applies to pipes using in-memory messages and to pipes using persistent messaging with messages stored in Cloud Object Store.
Public pipes can be accessed by any database session having execute
privilege on DBMS_PIPE. This applies to pipes using in-memory
messages and to pipes using persistent messaging with messages stored in Cloud
Object Store.
See SET_CREDENTIAL_NAME Procedure and GET_LOCATION_URI Function for more information.
See RECEIVE_MESSAGE Function for more information.