Consume messages from a given topic and return them as a lazily evaluated Scala Stream.
Consume messages from a given topic and return them as a lazily evaluated Scala Stream. Depending on how many messages are taken from the Scala Stream it will try up to 3 times to consume batches from the given topic, until it reaches the number of desired messages or return otherwise.
the topic from which to consume messages
the stream of consumed messages that you can do .take(n: Int).toList
to evaluate the requested number of messages.
Get the next batch of messages from Kafka.
Get the next batch of messages from Kafka.
the topic to consume
the next batch of messages