Broadleaf Microservices
  • v1.0.0-latest-prod

Notification Services Data Model

Overview

The Notification Service stores each Notification with a status of NEW, READY_TO_SEND, SENDING, SENT, RETRY, or ERROR.

Data Diagram

The following data shows the key tables and persisted JSON structures used by the Notification Service.

Notification Data Model

Key Domain Classes

Notification

The Notification represents the data for a Notification. This includes the Recipient(s), type of message, and data for the message. The dto is delivered to the NotificationService as part of the NotificationRequest.

A client passes in a Notification instance into the NotificationService#sendNotification() method. The service uses a NotificationHandler to populate key properties on the notification including the messageBody which is typically populated by taking the Notification#data and using it within a template.

Recipient

A Recipient refers to who the Notification will be sent to (email or phone). Typically, a transactional message has a single recipient. Multiple recipients are supported by some providers and email providers allow recipient’s to be flagged as cc or bcc. A Notification represents a single email. If an implementation wanted to bulk send notifications as part of a campaign, each target would need to use a different Notification and Recipient.

Sender

A Sender refers to who the Notification is coming from (email or phone). Typically, Sender information would be configured as part of the NotificationSender setup, although the system by default will try to send on behalf of the sender set on the Notification if one exists.

BLC Common Features

Notification services uses the following Common Data Features which create additional tables within the Notification Services data schema.

Tenant Trackable - Notification service data is tenant trackable to support the service running in a multi-tenant environment. For more information see : TODO Tenant Trackable common link

Message Idempotency - Notification services support receiving messages via Spring Cloud Stream. Idempotency support is provided. See [TODO] for more information on the general feature.