# The stream analytics model unable to process the bulk of events that are ingested cloud in no real time

**URL:** <https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601>\
**Category:** Forum\
**Tags:** analytics, Streaming-Analytics-Apama, cumulocity\
**Created:** [February 27, 2023, 4:12pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601 "2023-02-27T16:12:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![prathyusha.kanda](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@prathyusha.kanda](https://community.cumulocity.com/u/prathyusha.kanda)\
**Post date:** [February 27, 2023, 4:12pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/1 "2023-02-27T16:12:19Z")

</div>

#### What product/components do you use and which version/fix level are you on?

Latest

#### Is your question related to the free trial, or to a production (customer) instance?

Production

#### What are you trying to achieve? Please describe it in detail.

The events counter model has not processed bulk input events.  
Below is the screenshot of the model.  
The configuration of event input block is the “New events” and the ignore timestamp.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/a/7/a75817932358a7bc2f7cbcf5a17e41684b0dec46.png)  
The IoT device has sent bulk of events to the stream analytics model. The time difference between the real time events happend and ingestion time is 3 hours.

#### Do you get any error messages? Please provide a **full error** message screenshot and log file.

#### Have you installed all the latest fixes for the products and systems you are using?

yes

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [February 27, 2023, 4:32pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/2 "2023-02-27T16:32:35Z")

</div>

Can you attach an export of the model?

when you say the device has sent bulk events - how exactly is it doing this?

---

<div class="post-metadata">

**Author:** ![prathyusha.kanda](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@prathyusha.kanda](https://community.cumulocity.com/u/prathyusha.kanda)\
**Post date:** [February 28, 2023, 9:09am UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/3 "2023-02-28T09:09:34Z")

</div>

The iot edge gateway saves the events on the device when there is no internet connection. The unpublished events are sent to the cloud one by one through thinedge mqtt topic when the internet connection comes back.

[Test-Count.docx](https://community.cumulocity.com/uploads/short-url/f43cvPSdz9I3yhEZvVTZQVyjNjo.docx) (19.3 KB)

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [February 28, 2023, 10:34am UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/4 "2023-02-28T10:34:57Z")

</div>

I tested the model you sent, with events sent with MQTT and found no problems, the count was continually updated.

---

<div class="post-metadata">

**Author:** ![prathyusha.kanda](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@prathyusha.kanda](https://community.cumulocity.com/u/prathyusha.kanda)\
**Post date:** [March 2, 2023, 12:41pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/5 "2023-03-02T12:41:09Z")

</div>

The events are generated at 15:19:49 but uploaded at 18:21:30 to the cloud through [thinedge.io](http://thinedge.io).  
The above stream analytics model is unable to take this input for computation.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/5/1/514d1006de32ded48c891699103932c7bd509580.png)

Does the stream analytics model cannot take the late updated events for caluclation?

---

<div class="post-metadata">

**Author:** ![Richard\_Thrippleton](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Richard\_Thrippleton](https://community.cumulocity.com/u/Richard_Thrippleton)\
**Post date:** [March 2, 2023, 12:48pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/6 "2023-03-02T12:48:20Z")

</div>

Can you reproduce the problem, then provide an enhanced diagnostics zip (so it will contain information relevant to the error/anomaly if any)? There’s a link called ‘Enhanced’ at the bottom of the screen that will do the download for you.

---

<div class="post-metadata">

**Author:** ![Harald\_Meyer](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harald_meyer/32/1959_2.png) [@Harald\_Meyer](https://community.cumulocity.com/u/Harald_Meyer)\
**Post date:** [March 3, 2023, 9:21am UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/7 "2023-03-03T09:21:13Z")

</div>

From your initial description, it sounded like “Ignore Timestamp” was enabled. I loaded you model and it is actually disabled. Can you please re-test with “Ignore Timestamp” enabled?

Without it, Analytics Builder will discard events that are older than a couple of seconds:  
[https://documentation.softwareag.com/apama/Analytics\_Builder/pab10-15-0/webhelp/pab-webhelp/index.html#page/pab-webhelp%2Fco-AnaBui\_common\_block\_inputs\_and\_parameters.html%23wwID0EUSBO](https://documentation.softwareag.com/apama/Analytics_Builder/pab10-15-0/webhelp/pab-webhelp/index.html#page/pab-webhelp%2Fco-AnaBui_common_block_inputs_and_parameters.html%23wwID0EUSBO)

---

<div class="post-metadata">

**Author:** ![prathyusha.kanda](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@prathyusha.kanda](https://community.cumulocity.com/u/prathyusha.kanda)\
**Post date:** [March 7, 2023, 2:36pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/8 "2023-03-07T14:36:10Z")

</div>

What is difference between the Notification Modes New event, Updated only and All events in the input Event block?

---

<div class="post-metadata">

**Author:** ![Richard\_Thrippleton](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Richard\_Thrippleton](https://community.cumulocity.com/u/Richard_Thrippleton)\
**Post date:** [March 7, 2023, 2:55pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/9 "2023-03-07T14:55:27Z")

</div>

It’s configuring when an event will actually be received by the input block (and sent into the model).

In the Cumulocity IoT data model, an event can be modified in place, not just created. If an event is modified in place, then ‘Updates Only’ or ‘All’ will send that event with its latest state into the model each time it’s modified. With ‘New events only’ or ‘All’ you will also get newly created events going into the model.

---

<div class="post-metadata">

**Author:** ![prathyusha.kanda](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@prathyusha.kanda](https://community.cumulocity.com/u/prathyusha.kanda)\
**Post date:** [March 7, 2023, 4:21pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/10 "2023-03-07T16:21:20Z")

</div>

What does creation time and last updated time here means?

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/5/c/5ca970de7bbee50299f77dc42e0b651599e1ee7c.png)  
What time the event input block considers when ignore time stamp is used?

---

<div class="post-metadata">

**Author:** ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)\
**Post date:** [March 29, 2023, 2:01pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/11 "2023-03-29T14:01:32Z")

</div>

`creationTime` is the time when the object has been initially created in the database.  
`lastUpdated? is the time when the object has been last updated.

For events the `time` is used to reorder the events. When selecting **ignore Timestamp** the events are not re-ordered and will be processed as occurred in the platform.

In your case when not checked: an event has been processed which has a newer timestamp `time` so any other event with an older timestamp, even occured later, will be ignored. When checked you get this event, no matter if the time is in the past or future.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [September 25, 2023, 2:02pm UTC](https://community.cumulocity.com/t/the-stream-analytics-model-unable-to-process-the-bulk-of-events-that-are-ingested-cloud-in-no-real-time/7601/12 "2023-09-25T14:02:25Z")

</div>

Closed on September 25, 2023, 2:02pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
