@Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final TaskMetadata that = (TaskMetadata) o;
        return Objects.equals(taskId, that.taskId) &&
               Objects.equals(topicPartitions, that.topicPartitions);
    }
This function will return the time task idling started, if the task is not currently idling it will return empty
streams/src/main/java/org/apache/kafka/streams/processor/TaskMetadata.java