Apama Analytics Builder for Cumulocity IoT 10.3.1 | Apama Analytics Builder for Cumulocity IoT Documentation | Using Apama Analytics Builder for Cumulocity IoT | Wires and Blocks | Input blocks and event timing
 
Input blocks and event timing
Input blocks make data from external sources (such as Cumulocity IoT measurements) available to the model. Many data sources have timestamps on each piece of data, which reports the time that a measurement or event actually occurred. There may be delays in transmitting the data to the Apama system for processing, leading to events being received by Apama out of order.
For data sources that have timestamps associated with a piece of data, the input block can handle events received out of order. In order to do this, the input blocks hold all received events in a re-order buffer and delay processing them until a predefined delay time after their source timestamp. By delaying the processing of the event relative to the source timestamp, the input block allows events to be re-ordered. The key parameter to this process is the amount of time by which the events are delayed. You can configure this by editing the Configuration.mon file and modifying the value set for the TIMEDELAY_SECS constant; this is the time in seconds by which the input blocks delay inputs.
The input blocks assume that while events may be delivered out of order, they are received by Apama within the TIMEDELAY_SECS value. If an event is received after a delay of more than TIMEDELAY_SECS (that is, the difference between the timestamp in the event and the time on the system running Apama), then it is dropped. Thus, if the TIMEDELAY_SECS value is set too low, then a small delay may result in Apama dropping an event, which can lead to erroneous results. The higher the TIMEDELAY_SECS value is, the larger is the delay before an event is processed. Thus, it is important to pick a suitable value for TIMEDELAY_SECS to match the environment for events being delivered into Apama.
The correlator logs the number of dropped events periodically (every LOGGING_THROTTLE_SECS) to the correlator's log file, which can be found in /opt/softwareag/cumulocity-apama-rules/deploy/logs/correlator_defaultCorrelator.log.
For more information, see Configuring model timeouts.

Copyright © 2018-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.