function that returns a KafkaStream iterator