Partilhar via


Specifying Quantum Limits

In Notification Services, the generator maintains its own clock, which divides time into intervals. Each of these time intervals is called a quantum. You configure the interval length when you define an application.

Because rule processing can fall behind the system clock, you can define a generator quantum limit. This quantum limit determines how far behind the system clock the generator's quantum clock may run before Notification Services can skip processing of some rules.

The Generator's Quantum Clock

When the application first starts, the generator's quantum clock and the system clock are synchronized. If the generator quantum interval is five minutes, the generator fires rules every five minutes and processes all events and scheduled subscriptions due to be processed during the past five minutes.

If the instance, application, or generator is stopped or disabled, or if firing all the rules in a given quantum takes longer than the quantum duration, the generator's quantum clock falls behind the real-time clock.

If the generator quantum clock falls behind, Notification Services is behind on firing event chronicle rules and subscription rules. Notification Services will keep firing rules and processing data as fast as it can, but, depending on how far behind the generator's quantum clock is, it may take awhile to catch up.

Generator Quantum Limits

You can limit how far behind the generator's quantum clock is allowed to fall for both event chronicle rules and subscription rules. For example, you can specify that the application can only fall behind four quanta for event chronicle rules and two quanta for subscription rules. If the application falls so far behind that it exceeds these limits, it starts skipping rule firings until it is within the limits. In this case, when you restart the generator, Notification Services skips firing event chronicle rules for all but four quanta and subscription rules for all but two quanta.

When the generator skips event chronicle rules, event batches that arrived in the skipped quanta are not processed. When the generator skips subscription rules, the application does not generate notifications from events that arrived during the skipped quanta and does not generate notifications from scheduled subscriptions due in skipped quanta.

Quantum Limits Illustrated

In the following illustration, the generator was restarted and was eight quanta behind the real-time clock. The chronicle quantum limit is set to 4 and the subscription rule limit is set to 2. When the generator starts, it processes only the last four event chronicle rules and only the last two subscription rules.

Quantum limit effects

Example event and subscription timeline

The generator processes the event chronicle rules for the event batches (E9 – E12) that arrived in quanta 5 through 8, which are the last four quanta.

The generator also processes the subscription rules for all subscriptions that are due to be processed in quanta 7 and 8, which are the last two quanta. For any subscriptions that should have been processed prior to quantum 7, the subscription rules are skipped and notifications are not generated.

Determining Quantum Limit Values

When determining the values for the generator quantum limits, balance the requirements of timely notifications against the value of processing old data. If you must have more timely notifications, set a low limit, such as 1. If you must process all event batches and subscriptions, set a limit of 0

If you want to set the limit based on time, divide the desired time by the generator quantum duration. If you want your application to fall no more than 60 minutes behind the real-time clock, and your quantum duration is five minutes, divide 60 by five, which is a quantum limit of 12.

A value of 0 indicates no quantum limit. Notification Services attempts to process all quanta.

The default quantum limit is 1440 quanta. Therefore, if the quantum duration is one minute, the default quantum limit is one day.

To set the quantum limit for event chronicle rules
  • If you are defining an application through XML, set the quantum limit for event chronicle rules using the ChronicleQuantumLimit Element (ADF).
  • If you are defining an application programmatically, set the quantum limit for event chronicle rules using the ChronicleQuantumLimit property (NMO).
To set the quantum limit for subscription rules

See Also

Reference

ChronicleQuantumLimit
SubscriptionQuantumLimit

Concepts

Specifying Application Execution Settings
Specifying the Event Processing Order

Other Resources

ChronicleQuantumLimit Element (ADF)
SubscriptionQuantumLimit Element (ADF)

Help and Information

Getting SQL Server 2005 Assistance