Brightspot’s notifications mechanism implements the pub-sub architecture. You can trap events, retrieve the interested recipients, and deliver notifications over the recipients’ preferred medium.
Brightspot’s notification system is designed to send useful messages to the right recipients at the right time. The recipient of a notification is an instantiation of the class
Receiver. Receivers are typically editors, but they can also be mechanical such as a listserv or a log file. Every receiver has a
Set<Subscription> representing the subscriptions. A
Subscription describes the what, when, who, and where a notification is sent.
- The “what” is defined by the subscription’s
MessageContext, which contains information and metadata about the triggering event. An example of message context is “item 12345 was published.”
- The “when” and “who” are defined by a subscription’s
Publisher. This class detects when an event happens, assembles the message context, and broadcasts the message context to the receivers.
- The “where” is defined by a
DeliveryOption. Each subscription has a
Set<DeliveryOption>representing the different media over which the notification is sent and received. Each delivery option delivers a specific type of
Message(email, text, Slack, etc.), and that message can be customized with a
MessageFormatterbased on the specific subscription and message context.
Brightspot’s notification architecture is designed for extensibility, such as the following scenarios:
- Implement custom delivery options to integrate with third-party messaging services not included with Brightspot.
- Implement custom subscriptions so that editors receive notifications for custom events and actions in a workflow.
- Define custom message formatters with branding and content for each delivery option-subscription combination.