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
| builder | |
| .table("users") | |
| .suppress(Suppressed.untilTimeLimit( | |
| BufferConfig.maxBytes(myConfig.getUsersBufferSize()) | |
| )) | |
| ... |
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
| driver.pipeInput(recordFactory.create( | |
| /* topic */ "input", | |
| /* key */ "A", | |
| /* value */ "v1", | |
| /* timestamp */ 10L | |
| )); | |
| // Stream time is now 10L | |
| driver.pipeInput(recordFactory.create("input", "A", "v2", 11L)); | |
| // Stream time is now 11L |
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! */) |
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))) | |
| .count(Materialized.as("count-metric")) | |
| .filter( _ < 4 ) | |
| .toStream() | |
| .foreach( /* Send that email! */) | |
| // graph servlet queries "count-metric" |
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))) | |
| .count(Materialized.as("count-metric")) | |
| // graph servlet queries "count-metric" |