Last active
August 14, 2017 13:36
-
-
Save matzew/bbebb4f78523c5e0b2c098c9830482c4 to your computer and use it in GitHub Desktop.
This file contains 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
package net.wessendorf; | |
import net.wessendorf.kafka.cdi.annotation.KafkaStream; | |
import org.apache.kafka.streams.kstream.KStream; | |
import org.apache.kafka.streams.kstream.KTable; | |
public class StreamProcessor { | |
@KafkaStream(input = "input_topic", output = "output_topic") | |
public KStream transformer(final KStream<String, String> source) { | |
return ource.filter((key, value) -> value.equals("Success")) | |
.groupByKey() | |
.count("successMessagesStore") | |
toStream(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment