Notifications
OCI Notifications is a pub/sub service for delivering alerts and messages to email, SMS, Functions, Slack, PagerDuty, and custom HTTPS endpoints.
Dependency Coordinates
Maven
<dependency>
<groupId>com.oracle.cloud.spring</groupId>
<artifactId>spring-cloud-oci-starter-notification</artifactId>
</dependency>
Gradle
dependencies {
implementation("com.oracle.cloud.spring:spring-cloud-oci-starter-notification")
}
Using Notifications
The starter auto-configures a Notification bean for topic, subscription, and publish operations.
@Autowired
private Notification notification;
public void createTopic() {
CreateTopicResponse response =
notification.createTopic("my-topic", compartmentOcid);
}
Configuration
| Name | Description | Required | Default |
|---|---|---|---|
spring.cloud.oci.notification.enabled | Enables the OCI Notifications APIs | No | true |