Brightspot CMS Developer Guide
Brightspot CMS Developer Guide
Developer guide

Notification lifecycle

Brightspot invokes the following process when processing notifications.

  1. An event occurs (e.g., a ToolUser publishes a Content).
  2. Create a publisher with all the message context information for the event (content ID, user ID, etc.)
  3. Invoke the publisher’s Publisher#publishNotification/Async method, which performs all of the following steps.
  4. Publisher fetches a list of all possible receivers by invoking Publisher#getReceivers.
  5. For each receiver:

    1. Fetch the set of subscriptions with Receiver#getReceiverSubscriptions.
    2. For each subscription:

      1. Check if the following are true:

        • Subscription matches the publisher’s generic type argument <S> in Publisher<S, C>.
        • Subscription#shouldDeliver(Receiver, C) returns true.

        If one of the tests fails, proceed to the next subscription.

      2. Build the list of delivery options with Subscription#getDeliveryOptions.
      3. For each delivery option:
        1. Fetch the delivery option’s list of message formatters by calling DeliveryOption#getMessageFormatters.
        2. Find the message formatters that match the current subscription and delivery option.
        3. For each message formatter:
          1. Attempt to format the MessageContext into the DeliveryOption<M>-specific message type <M> by calling MessageFormatter#format(MessageContext, D).
          2. If there are no valid message formatters, create a message from the subscription’s default HTML or plain text format by calling Subscription#to[Html/String]Format(Receiver, Context), passing the result to the current delivery option, and calling DeliveryOption#messageFrom[Html/String](MessageContext, String result).
          3. Take the formatted message and deliver it by calling DeliveryOption#deliverMessage(M).
          4. Capture the receiver ID, subscription ID, and any errors thrown as a DeliveryException during delivery of the message, and place into a DeliveryReference receipt for that message.
  6. Compile all delivery references for each receiver, subscription, and delivery option, along with the event message context and original publisher, into a notification object, and save it to the database.
Previous Topic
Next Topic
Custom delivery options
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Apple News