The Notification Service stores each Notification with a status of NEW, READY_TO_SEND, SENDING, SENT, RETRY, or ERROR.
The following data shows the key tables and persisted JSON structures used by the Notification Service.
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.
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
.
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.