DPS Notification Service
Notifications are sent after certain operations are done against settings.
Notifications are disabled by default. To enable them, property ipf.dps.notification-service.enabled needs to be set to true.
We now support only CRUD operations notifications. So, after create, update, and delete operation, a notification is sent.
Here is the example of the DpsCrudNotification message:
{
"settings": "settingType",
"logicalUniqueKey": "logicalUniqueKey",
"action": "CREATED"
}
Here is the example of the DpsNotificationServicePort interface:
public interface DpsNotificationServicePort {
CompletionStage<Void> sendSettingCrudNotification(String logicalUniqueKey, String settingType, DpsCrudNotification.CrudNotificationAction action);
}
When creating a setting that requires an approval, the corresponding notification will not be sent at the moment of creation. It’ll be sent when the setting is approved.
DPS Notification Service Kafka
This is the kafka implementation of the DPS Notification service. All notifications are sent to a dedicated kafka topic.
Here is the example of hocon configuration for DPS Notification Service Kafka
ipf.dps {
notification-service {
enabled = true
kafka {
producer {
topic = DPS_CRUD_NOTIFICATION
restart-settings = ${common-flow-restart-settings}
kafka-clients {
group.id = dps-crud-notification-group
}
}
}
}
}
common-flow-restart-settings {
min-backoff = 1s
max-backoff = 5s
random-factor = 0.25
max-restarts = 5
max-restarts-within = 10m
}