cancel
Showing results for 
Search instead for 
Did you mean: 
littlebigfab
Starfighter Starfighter
Starfighter
  • 305 Views

Lab 6.9 Windowing grace period ignored

Hello,

In AD482 lab 6.9 (Troubleshooting AMQ Streams Applications), I'm unable to make the grace period work. The turbines keep reported significantly less than 10 events by group of 10 seconds.

Out of despair, I'm now using the solution files for both the producer and the backend apps. Just with my .env file in the backend app. It still doesn't work, so I suspect that there is a missing piece of the puzzle.

wattsValuesStream
    .groupByKey()
    .windowedBy(
        TimeWindows
            .of(Duration.ofSeconds(10))
            .advanceBy(Duration.ofSeconds(10))
            // TODO: adjust grace period
            .grace(Duration.ofSeconds(12)) ) 

...output omitted...
 
Does anyone make the grace period work?
 
I'm looking at the timestamps in the producer app. What catches my attention is that some records marked as DELAYED are actually in the future. For example, if I filter the output on turbineId=2 only:

 

 

 

 

Produced { turbineId: 2, power: 1967010 } - Timestamp: 1707563024000
Produced { turbineId: 2, power: 1967062 } - Timestamp: 1707563026000
Produced { turbineId: 2, power: 1967039 } - Timestamp: 1707563016000 - DELAYED!
Produced { turbineId: 2, power: 1966991 } - Timestamp: 1707563022000 - DELAYED!
Produced { turbineId: 2, power: 1967158 } - Timestamp: 1707563064000 - DELAYED!
Produced { turbineId: 2, power: 1967047 } - Timestamp: 1707563023000

 

 

 

 

The second last record does not look right.

I have the same pattern for all 3 turbines.

Can reproduce by using the solution files + one's own .env file in the backend app.

0 Kudos
0 Replies
Join the discussion
You must log in to join this conversation.