Forked from vvcephei/suppression-blog-figure-3.java
Last active
March 19, 2019 03:48
-
-
Save confluentgist/9d70c170403ff77674b55775265cd083 to your computer and use it in GitHub Desktop.
Metrics App with Alerts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
events | |
.groupByKey() | |
.windowedBy( | |
TimeWindows.of(Duration.ofMinutes(2).withGrace(Duration.ofMinutes(2)) | |
) | |
.count(Materialized.as("count-metric")) | |
.suppress(Suppressed.untilWindowClose(BufferConfig.unbounded())) | |
.filter( _ < 4 ) | |
.toStream() | |
.foreach( /* Send that email! */) | |
// graph servelet queries "count-metric" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment