Notification Distribution
Notification Services uses subscriber devices, delivery channels, and delivery protocols, which are discussed below, to determine how and where to deliver notifications. This topic also describes how these objects are related and how you define these objects for your application.
Delivery Channels
A delivery channel represents a specific delivery endpoint. A delivery channel can be an e-mail server or an operating system file. Each delivery channel has an associated delivery protocol that is used to package and send notifications to the delivery endpoint.
You define delivery channels in the instance configuration when you configure an instance of Notification Services. All applications hosted by the instance use the same set of delivery channels.
Delivery Protocols
A delivery protocol is an implementation of a delivery method, such as Simple Mail Transfer Protocol (SMTP) for e-mail messages and Short Message Service (SMS) for text messaging. A delivery protocol wraps formatted notifications with any information required by the delivery system, such as an address and subject for an e-mail, and then sends the notification to its delivery channel.
You configure delivery protocols for each notification class of an application. For each delivery method supported by the notification class, you provide delivery protocol configuration information that Notification Services uses to determine how the notification data maps to requirements of the delivery method. For example, to support e-mail delivery and text messaging, you would define an SMTP delivery protocol and an SMS delivery protocol. The delivery protocol itself is either a standard delivery protocol included with Notification Services or is a custom delivery protocol that implements a specific delivery method.
When you define delivery channels for an instance of Notification Services, you associate a delivery protocol with each delivery channel. Multiple delivery channels can use the same delivery protocol. For example, you can have two delivery channels that use the File delivery protocol. Each delivery channel can write notifications to a different file.
If you are using custom delivery protocols, you must declare the protocol class name and assembly name in the instance configuration.
Associating Notifications With Delivery Protocols and Channels
When you define an application, you associate a notification class with one or more delivery protocols, and you associate each delivery channel with one delivery protocol. But how do individual notifications get associated with delivery protocols and channels?
When you develop a subscription management interface, you collect information about subscribers and their subscriptions. Using this interface, subscribers configure one or more subscriber devices on which to receive notifications. Each subscriber device contains the subscriber ID, a delivery channel name, and an address.
When a subscriber creates a subscription, your subscription management interface must associate a device name with the subscription. Your interface can either hard-code a subscriber device, or let the subscribers choose between the devices they have configured.
When Notification Services generates a notification, the notification contains the subscriber ID and device name provided by the subscription rule. When it is time to deliver the notification, the distributor gets the delivery channel and address for the subscriber device and then gets the delivery protocol associated with the delivery channel. At this point, Notification Services has the information it needs to package the notification and send it to the delivery channel.
Defining Delivery Information
When developing applications, you must define all of the information required to distribute notifications.
- For each notification class, declare all delivery protocols that the notification class supports. You can specify multiple delivery protocols for each notification class. For more information, see Configuring Delivery Protocols.
- If you have any custom delivery protocols, declare them in the instance configuration. (Notification Services is aware of all standard delivery protocols.) For more information, see Defining Custom Delivery Protocols.
- Define each delivery channel (including its delivery protocol) in the instance configuration. For more information, see Defining Delivery Channels.
- Design your subscription management interface to specify the delivery channel that each subscriber device uses. This can be hard-coded or you can allow the user to select a value. The delivery channel specified must be one of the delivery channels defined in the instance configuration. For more information, see Developing Subscription Management Interfaces.
- In the subscription rule that generates notifications, insert the subscriber ID, device name, and subscriber locale fields into the notification table. For more information, see Defining Subscription Rules.
See Also
Concepts
Notification Formatting and Delivery Architecture
Defining Custom Delivery Protocols
Defining Delivery Channels
Defining Subscription Rules
Other Resources
Defining Notification Classes
Defining Notification Services Applications
Configuring Delivery Protocols
Developing Subscription Management Interfaces