Lesson 7: Configuring the Generator and Distributor
In this lesson, you will review generator and distributor settings in the application definition file (ADF) and then modify and update the distributor settings.
The generator that is run by the Notification Services engine governs the rule processing for a notification application. Settings for the generator determine which computer runs the generator and how many threads the generator can use when it processes application rules.
Each application has one generator. For more information about generators, see Specifying Generator Settings.
Distributors, which are also run by the Notification Services engine, govern notification formatting and delivery. On a configurable interval, called a distributor quantum, the distributor looks for a group of notifications, called a work item, to process. If a work item is available, the distributor acquires the work item, calls the content formatter to transform the notification data, and then sends the formatted notifications using a delivery protocol.
Each application can have one or more distributors, with a maximum of one distributor per application per computer. For more information about distributors, see Specifying Distributor Settings.
For purposes of this application, the generator and distributor will run on the local computer, and you will use the default thread pool settings.
Notice that the system name value for the generator and the distributor in the XML is
%_NSServer_%. You provide a value for this parameter through the instance configuration file (ICF) when you create or update the instance.
In this lesson, you will simply add a polling interval for the distributor; the polling interval defines how frequently the distributor looks for work items. This interval will be 15 seconds. This is PT15S in the XML duration format.
The XML in this section defines the distributor for the Weather application. Examine the XML and then follow the instructions to copy the XML to the ADF.
Click Copy Code to copy the XML to the Windows Clipboard.
In Solution Explorer, open WeatherADF.xml.
Replace the following XML comment with the XML you just copied.
<!-- Paste QuantumDuration here -->
Notice that the only line of code you are adding is the distributor's QuantumDuration element and value. If you prefer, you can just add that line of XML to the ADF.
On the File menu, click Save WeatherADF.xml.
After you modify the ADF, you update the instance of Notification Services to modify distributor settings in the application database.
In Object Explorer, expand Notification Services.
Right-click Tutorial, point to Tasks, and then click Update.
In the Update Instance dialog box, click Browse, locate the TutorialICF.xml file, and then click Open.
In the Parameters pane, review the values for the parameters. Use the same values you used to create the instance.
Review the Notification Services - Update Summary dialog box, and then click Update.
When the update is completed, click Close.