-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I am running the steams example from > Labs > Streams: Aggregate and I am curious about the expected behaviour when using a SUM style aggregate approach.
When I run the application from the example code it is working all fine and I can see the correct responses that at every 5000 ms it produces the correct response. However if I leave the app running and don't inject any messages I get no message at all. It seems the absence of invoking the http request does not create a result of zero. Can you confirm this is expected?
If it is expected what would be the recommend means for me to send to a downstream system that the result of 0 messages is 0 messages received. I am asking because in my use case I want to create a stream of data that I am using to track items and display the amount of items currently being tracked. However there will be times when there are 0 messages received in the time window. I need a way to notify downstream that I am still tracking but currently there are no items being tracked.
For example:
Time window 1: 1000 messages from 5 unique items = Result 5 Items being tracked
Time window 2: 1500 messages from 5 unique items = Still result 5 Items being tracked
Time window 3: 0 messages received so no unique items --> Currently no message. Therefore am I still tracking 5 or 0 items.
I need a way for a sum result to be available even if I receive no messages.
The version of the demo that I was using that now drives my question is detailed below:
"name": "aggregator",
"type": "flogo:app",
"version": "0.0.1",
"appModel": "1.0.0",