We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After #139 we noticed that there are a lot of idling in KafkaConsumer.batchConsumerPoll
KafkaConsumer.batchConsumerPoll
Seems that now for-loop does not exit when there is no more messages:
private func batchConsumerPoll( client: RDKafkaClient, maxMessages: Int = 100 ) -> [Result<KafkaConsumerMessage, Error>] { var messageResults = [Result<KafkaConsumerMessage, Error>]() messageResults.reserveCapacity(maxMessages) for _ in 0..<maxMessages { var result: Result<KafkaConsumerMessage, Error>? do { if let message = try client.consumerPoll() { result = .success(message) } } catch { result = .failure(error) } if let result { messageResults.append(result) } /// <-------- seems we should else { return messageResults } } return messageResults }
Not sure if it is intended. Could you advise, please?
The text was updated successfully, but these errors were encountered:
Yes we should be doing that. Do you mind opening a PR?
Sorry, something went wrong.
No branches or pull requests
After #139 we noticed that there are a lot of idling in
KafkaConsumer.batchConsumerPoll
Seems that now for-loop does not exit when there is no more messages:
Not sure if it is intended. Could you advise, please?
The text was updated successfully, but these errors were encountered: