Udostępnij za pośrednictwem


Specifying Digest or Multicast Delivery

Notification Services provides two options for aggregating notifications: digest and multicast delivery. Digest delivery combines messages for a single subscriber into one message. Multicast delivery conserves content formatter resources by recognizing when the same notification will be sent to many subscribers, formatting the notification once, and then sending the notification.

Important

You can use either digest delivery or multicast delivery, but not both.

This topic describes digest and multicast delivery and how to configure these options.

Digest Delivery

Some applications may generate several notifications for a single subscriber within the same notification batch. To reduce the number of messages sent to individual subscribers, you can enable digest delivery, which combines similar notifications into one digest message.

When digest delivery is enabled for a notification class, all notifications within a single notification batch are considered for digest delivery. For all notifications within a batch that have the same subscriber ID, locale, device, and data in any digest-enabled notification fields, Notification Services combines the individual notifications into a digest notification and then sends all that data to the content formatter, which returns a single formatted result.

The first notification in the set that forms the digest notification is called the digest head notification, and the remaining notifications are called digest trailer notifications. The message body is composed of the aggregated information from all the notifications.

The following table represents a simplified notification table for a notification class. In this notification class, the State field has the digest grouping property set to true, so its fields are used to determine digest grouping. The bold rows represent notifications that will be combined into a digest message.

NotificationId SubscriberId DeviceName SubscriberLocale City State

1

Bob

e-mail

en-US

Seattle

WA

2

Alan

e-mail

en-US

Seattle

WA

3

Bob

e-mail

en-US

Spokane

WA

4

Bob

e-mail

en-US

San Francisco

CA

5

Bob

file

en-US

Tacoma

WA

In this example, the values in the SubscriberId, DeviceName, SubscriberLocale, and State columns must be the same for Notification Services to combine notifications into a digest. Notifications 1 and 3 meet the matching criteria and will be combined into a digest. Notification 2 is for a different subscriber, notification 4 is for a different state, and notification 5 is for a different device, so these notifications will not be combined based on the data in this table.

To enable digest delivery

If you are defining an application using XML, enable digest delivery in the NotificationClass element of the application definition file (ADF). If you are defining an application programmatically, use Notification Services Management Objects (NMO) to enable digest delivery.

Multicast Delivery

Note

Multicast delivery is not supported in SQL Server 2005 Standard Edition.

If your application is likely to generate the same notification data for multiple subscribers, you can enable multicast delivery so that the content formatter formats a notification once and then sends the notification to a list of subscribers.

For notification classes that have multicast delivery enabled, the distributor takes these actions to format multicast notifications:

  1. The distributor sorts the rows of the table by values for device, locale, and notification fields.
  2. The distributor starts reading rows. So long as the values of the relevant columns are the same, the distributor adds the subscriber information to the multicast list. You can limit the number of subscribers for each multicast message. For more information, see Specifying the Delivery Protocol Name and Fields.
  3. As soon as the distributor encounters a row with different values for the relevant columns, it passes the previous set of column values to the content formatter and hands the formatted output, along with the subscriber list, to the delivery protocol.

The following table shows the same notification data used to illustrate digest delivery. This time, the device, locale, and all notification fields are used to determine which notifications are multicast.

NotificationId SubscriberId DeviceName SubscriberLocale City State

1

Bob

e-mail

en-US

Seattle

WA

2

Alan

e-mail

en-US

Seattle

WA

3

Bob

e-mail

en-US

Spokane

WA

4

Bob

e-mail

en-US

San Francisco

CA

5

Bob

file

en-US

Tacoma

WA

Notifications 1 and 2 contain identical City and State data, but are for different subscribers. If multicast delivery is enabled, Notification Services formats notification 1 and then sends the formatted message with the recipient list (Bob and Alan) to the delivery protocol. However, because notifications 3, 4, and 5 contain unique City and State data, these notifications are not multicast.

Multicast Considerations

Multicast delivery is transparent to subscribers. The actual network protocol used to send the notification messages does not have to support multicasting.

When multicast delivery is enabled, the delivery protocol receives the formatted message once with a list of subscriber information. The delivery protocol must be able to use the recipient list to send the formatted message to multiple subscribers. It can do this either by sending a single message, if the network protocol supports true multicast delivery, or by simply iterating through the subscriber list and sending the same message to each subscriber.

The standard delivery protocols support multicast delivery. If you are using third-party delivery protocols, contact the developer to determine if the delivery protocol supports multicast.

Also, for multicast delivery to work properly, multicast notifications must not contain any subscriber-specific information because the same formatted output is being sent to many subscribers. The distributor does not pass any recipient information to the content formatter. If the content formatter is programmed to use recipient information for formatting, it fails.

Notification Services does not prevent the incorporation of subscriber-specific information from external data sources into the notification data during the formatting process, however. Ensure that any external information that the content formatter adds to the notification data is not recipient-specific.

To enable multicast delivery

If you are defining an application using XML, enable multicast delivery in the NotificationClass element of the application definition file (ADF). If you are defining an application programmatically, use NMO to enable multicast delivery.

See Also

Concepts

Developing a Custom Content Formatter
Developing a Custom Delivery Protocol
Defining the Notification Schema
Configuring Content Formatters
Specifying the Notification Batch Size
Specifying the Notification Expiration Age
Specifying the Delivery Protocol Name and Fields

Other Resources

Defining Notification Classes
Configuring Delivery Protocols
Defining Notification Classes
Defining Notification Services Applications

Help and Information

Getting SQL Server 2005 Assistance