Delen via


Specifying the Generator Quantum Duration

In Notification Services, the generator does not run continuously. Instead, the generator maintains its own clock, which divides time into distinct intervals. Each of these time intervals is called a quantum. At the end of each quantum, the generator fires rules, which process events that arrived and scheduled subscriptions that were due during this quantum. When you define a Notification Services application, you define the generator quantum for the generator.

For example, you can configure a generator quantum of five minutes. The generator fires event and subscription rules for each five-minute interval and processes all events that arrived during the interval and all scheduled subscriptions due to be processed during the interval.

Note

The generator quantum is independent of the distributor quantum. For more information about the distributor quantum, see Specifying Distributor Settings.

Quantum Durations

Notification Services does the following, in order, once per quantum:

  1. Fire event chronicle rules.
  2. Fire subscription event rules.
  3. Fire subscription scheduled rules.

By configuring the generator quantum, you control how frequently Notification Services attempts to fire this sequence of rules. For example, if you set the generator quantum to five minutes, Notification Services would attempt to fire this sequence of rules once every five minutes.

Note

The ProcessEventsInOrder setting also affects how often Notification Services processes events and subscriptions and generates notifications. For more information, see Specifying the Event Processing Order.

Choosing a Quantum Duration

When configuring the generator quantum, you can choose a short time, such as 15 seconds, or a longer time, such as 15 minutes. However, there is a trade-off between application responsiveness and resource consumption.

  • If you configure a very short generator quantum, the application consumes more system resources. However, subscribers are likely to receive event-driven notifications closer to the actual arrival of the events, and scheduled subscriptions will be processed more closely to the actual subscription schedule.
  • If you configure a longer generator quantum, the application will consume fewer system resources. However, there may be a longer delay between when events arrive, or when scheduled subscriptions are due, and when notifications are generated.

If the application requires more time than the quantum duration to fire all rules, your application may fall behind. Chronicle and subscription rule limits control how far your application is allowed to fall behind before skipping rule firings. For more information, see Specifying Quantum Limits.

The default generator quantum is 1 minute.

To specify the generator quantum

If you are defining an application through XML, define the generator quantum in the application definition file (ADF). If you are defining an application programmatically, use Notification Services Management Objects (NMO) for to define the generator quantum.

See Also

Reference

Microsoft.SqlServer.Management.Nmo.Application.QuantumDuration

Concepts

Specifying Application Execution Settings
Specifying the Event Processing Order
Specifying Quantum Limits

Other Resources

QuantumDuration Element for ApplicationExecutionSettings (ADF)

Help and Information

Getting SQL Server 2005 Assistance