Sdílet prostřednictvím


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.

Generator and Distributor Primer

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.

Weather Application Generators and Distributors

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.

Modify the Distributor ADF Code

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.

To modify the distributor ADF code

  1. Click Copy Code to copy the XML to the Windows Clipboard.

    <QuantumDuration>PT15S</QuantumDuration>
    
  2. In Solution Explorer, open WeatherADF.xml.

  3. 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.

  4. On the File menu, click Save WeatherADF.xml.

Update the Instance of Notification Services

After you modify the ADF, you update the instance of Notification Services to modify distributor settings in the application database.

To update the instance of Notification Services

  1. In Object Explorer, expand Notification Services.

  2. Right-click Tutorial, point to Tasks, and then click Update.

  3. In the Update Instance dialog box, click Browse, locate the TutorialICF.xml file, and then click Open.

  4. In the Parameters pane, review the values for the parameters. Use the same values you used to create the instance.

  5. Click OK.

  6. Review the Notification Services - Update Summary dialog box, and then click Update.

  7. When the update is completed, click Close.

Next Lesson

Lesson 8: Altering Application Execution Settings

See Also

Concepts

Notification Services Tutorial

Other Resources

Specifying Generator Settings
Specifying Distributor Settings
Building Notification Solutions
Introducing SQL Server Notification Services

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

5 December 2005

Changed content:
  • Updated content to clarify default settings and to clarify what changes you make to the XML file.