Hi, I was trying to use filter to sampling a Kafka direct stream, and the filter function just take 1 messages from 10 by using hashcode % 10 == 0, but the number of events of input for each batch didn't shrink to 10% of original traffic. So I want to ask if there are any way to shrink the batch size by a sampling function to save the traffic from Kafka?
Thanks! Samuel