I'm writing this to get a solution for the problem, where a stream of messages are sent and I want to count the word "Apples" in the stream of data, let's say in a window of 10 seconds.
I tried AttributeRollingWindow but couldn't got the desired response.
Thanks in Advance,
if working example of attributeRollingWindow is there, that would be of help too.
You can write a simple custom processor which uses local caching (like Caffeine cache implementation) with cache expiry time as ur window time and build the logic.
May be you can store words in cache and keep updating the count or something like that