Send Messages to OCI Notifications Service from Autonomous Database
Describes
how to send messages from Autonomous Database to an OCI Notifications service topic.
The subscriptions you configure with the OCI Notifications service determine endpoints for a topic.
Published messages are sent to each subscription for
a topic. There are a number of supported
subscription protocols, including: email, function,
and Slack. See Overview of Notifications for more
information.
When you use the OCI Notifications service with DBMS_CLOUD_NOTIFICATION
package, only the DBMS_CLOUD_NOTIFICATION.SEND_MESSAGE
procedure is supported (the DBMS_CLOUD_NOTIFICATION.SEND_DATA
procedure is not supported).
The subscriptions you configure determine endpoints for a
topic. Published messages are sent to each
subscription for a topic. There are a number of
supported subscription protocols, including: email,
function, and Slack.
Send a message using Oracle Cloud Infrastructure signing key
credentials:
BEGIN
DBMS_CLOUD_NOTIFICATION.SEND_MESSAGE(
provider => 'oci',
credential_name => 'OCI_KEY_CRED',
message => 'Text message',
params => json_object('topic_ocid' value 'oci********pa',
'title'value 'Title for message'));
END;
/
Send a message with resource principal credentials:
BEGIN
DBMS_CLOUD_NOTIFICATION.SEND_MESSAGE(
provider => 'oci',
credential_name => 'OCI$RESOURCE_PRINCIPAL',
message => 'Text message',
params => json_object('topic_ocid' value 'oci********pa',
'title' value 'Title for message'));
END;
/
With the oci provider there are different
possible endpoints for a message, based on the subscriptions. The
title parameter is treated differently for different
subscription protocols:
email: The title specifies the subject
line of the message.
Slack: The title value is not used. If it
is included the value is ignored.
Limitations for Notifications with
OCI Notifications Service
🔗
There are
limitations when you use DBMS_CLOUD_NOTIFICATION to send messages and you use the oci provider (OCI Notifications service).
Note the following limitations:
Message Size Limit: The message size limit per request is 64KB. Messages
exceeding this size cannot be sent or processed within a single request.
Message Delivery Rate Limit: There are different message delivery rate
limits depending on the protocol used.
email protocol: the limit is 10 messages per minute per
endpoint.
This restriction may impact the speed at which messages can be transmitted
and received.
Transactions Per Minute (TPM) per-tenancy Limit: There is a TPM limit of
60 per topic for this operation. This limit represents the maximum number of
messages per minute that can be processed or handled for a given topic. Exceeding
this limit may result in messages not being processed or processed at a slower
rate.
The the Autonomous Database
instance, the credential, if you are using user credentials, and the subscription
topic must all be located in the same region.