Repository navigation
LAB 11 ‐ Topic & Notification
In OCI, Topics and Notifications are the core components of the OCI Notifications Service (ONS). They work together to implement a Pub/Sub (Publish/Subscribe) architecture, which is a modern way for different cloud services to communicate without being directly connected to each other.
A Topic is a communication channel used to send messages to multiple users or systems.
- It acts like a group
- You publish a message once → it goes to all subscribers
A Topic is a central place where messages are sent and distributed to all subscribed endpoints.
A Notification is the actual message/alert sent to users through a topic.
- Triggered by events (like alarms, failures, etc.)
- Delivered via Email, SMS, or other endpoints
A Notification is an alert message sent to users when something happens.
- Create a Topic
- Add Subscriptions (Email, SMS, etc.)
- A service (like Monitoring Alarm) sends a message to the topic
- The topic delivers notifications to all subscribers
You want to get notified when CPU usage is high.
-
Create a Topic
👉 Name:High-CPU-Alert -
Add Subscription
👉 Email:admin@example.com -
Create Alarm in Monitoring
👉 Condition: CPU > 80% -
When CPU exceeds 80%:
- Alarm triggers
- Message sent to Topic
- Topic sends Notification (Email) to admin
Compute Instance (CPU High)
↓
Monitoring Alarm Triggered
↓
Topic (High-CPU-Alert)
↓
Notification (Email/SMS)
↓
Admin/User
| Feature | Topic | Notification |
|---|---|---|
| Purpose | Channel / Group | Message / Alert |
| Role | Holds subscribers | Delivers information |
| Example | High-CPU-Alert | "CPU usage is above 80%" |
- Topic = WhatsApp Group
- Notification = Message sent in that group
In OCI, a Topic is a communication channel used to send messages to multiple subscribers, while a Notification is the actual alert message delivered to those subscribers.
-
Select burger menu
-
Navigate to Developer Services and click on "Notifications"
- select the compartment where instance is created, then click on create topic.
4.Enter name, description and select root compartment then click on create.
5.To create the subscription click on subscription option
6.click on create subscription
7.In configure subscription, inside protocol select Email from drop down and provide the valid email to get the notification and click on create