Execution of Usage Metering Streams

Cloud_Edition_button.webp

At this point, you should have designed the metering solution by creating,

  • meter types

  • meters

  • stream with meter processor (including guiding rules that have been tested using preview).

The next step is to execute the stream with a meter processor. The processing of the usage data and updates on meters relies on the stream execution. If a stream containing a meter processor connected to a set of meters is not executed, the meters linked to that stream will not be updated, reset, or flushed.

It is recommended that you run a stream more frequently than the meter type’s Reset schedule. This will ensure that the meters are metering for the correct period and are being flushed as defined in the Reset schedule. As an example, if you have configured the meter type to reset the meters once a day, then the stream linked to your meter type should run at least once a day or more. See Meter Reset in

The Inspect view can be used to get an overview of the different meters associated with the Meter processor function and make sure that meters are being updated correctly after a stream execution, see .

A stream can be executed regularly by using the stream . If the stream configuration is updated then the stream must be rescheduled for any changes to take effect.

Realtime vs Batch Stream Execution

The stream can be executed in batch and real-time mode. For more information on real-time and batch streams, see

When a stream is executed as a batch stream, the will start by scanning for meters whose period end has passed. Meters with an expired Period end will be flushed to the next processor in the stream and reset. this will start a new metering period before processing additional incoming data.

If a stream is configured to flush by Period end, in the meter processor a scan to check the meter period end will also be performed at the end of the stream execution, but if a stream is configured to flush by Stream execution then all meters in your storage linked to that meter processor will be reset and flushed regardless of whether the meters period have ended or not.

When you have a stream in a real-time scenario, the scan to check meter period end will execute once every 60 seconds to check for any meters whose period has ended. This means that meters can be flushed once every minute. A meter processor running in a real-time scenario can only be configured with a flush by Period end.