Question
Incorrect event recorded and inorrect count
I have a event strategy having a sliding window of 4 days based on a date time stamp field passed in request payload.The window is behaving incorrectly.It emits all the events.(past events, more than 4 days in the past and even new ones).The version is 7.3
The scenarios is as follows :-
Create a event strategy having a sliding window of 4 days based on system time/click time(some property of event payload).All the vents irrespective of time are written to the database.
Also the count is incorrect.For example. If the event key is Customer Id 123.The counts written to DB for three events is :-
Payload 1:
Customer ID: 123
Clicked : Yes
PropositionName : XY
Payload 2:
Customer ID: 123
Clicked : Yes
PropositionName : XY
Payload 3:
Customer ID: 123
Clicked : Yes
PropositionName : XY
Result in DB
Customer Id PropositionName Count
123 XY 1
123 XY 2
123 XY 3
Expected Result
Customer Id PropositionName Count
123 XY 3
Thanks,
Rachna
***Moderator Edit: Vidyaranjan | Updated SR details; tagged SR parallel***
Hi,
If you select to use Event time ("clickTime" property) then Event Strategy uses this property as a time provider. System time is not used as a reference, that's why it is legal to insert event from past 2017.03.03 as in your example. At this point Event Strategy "thinks" the current date is 2017.03.03. If you insert at this point event with date later than 2017.03.07 then the first event will be evicted as it is older than "current" time by more than 4 days. If you want to use real time instead of simulated one then you need to select "system time".
Regards,
Hubert Szostek