Publishing a Message to a Topic
Directly publish a message to a topic in Notifications.
Each message is broadcast to all subscriptions in the specified topic . Every message sent out as email contains a link to unsubscribe from the related topic.
Publish messages to function subscriptions to create automation. For example, see Scenario A: Automatically Resizing VMs.
Message delivery rate limits per endpoint:
- 60 messages per minute for HTTP-based protocols. HTTP-based protocols use URL endpoints that begin with
http:
orhttps:
. - 10 messages per minute for email protocol.
Before You Begin
Meet the following prerequisites:
- Ensure that you have the correct IAM policies. See IAM Policies.
- You need an existing topic with at least one subscription. For details, see Creating a Topic and Creating a Subscription.
Use the oci ons message publish command and required parameters to publish a message to a topic:
oci ons message publish --body <message_text> --topic-id <topic_OCID>
For a complete list of parameters and values for CLI commands, see the Command Line Reference for Notifications.
Run the PublishMessage operation to publish a message to a topic.
Troubleshooting
For troubleshooting information related to published messages, see Message Not Received.