Actually there is no need for Kafka's iterate because Clojure provides a better way of dealing with streams. You can think about Kafka streams as a sequence and just do the following:
(doseq
[^kafka.message.MessageAndMetadata message stream] (do-some-stuff message))
This is probably the most efficient way of doing that.
More of the code is here: