Filtering

Learn how to use the filter operator in Kafka Streams topology.

Now that we have our incoming Track objects properly deserialized, we’ll move on to fulfill the second requirement: tracks that have been listened to for less than 30 seconds should be disregarded.

To achieve that, we will use the filter operator. Using the filter operator on a stream creates a new stream that consists only of records satisfying a condition provided to the filter. Records that do not meet the condition are ...