You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "philipnee (via GitHub)" <gi...@apache.org> on 2024/05/02 16:18:15 UTC
Re: [PR] KAFKA-16433: BeginningAndEndOffsets and OffsetsForTimes should send an event and return empty with zero timeout provided [kafka]
philipnee commented on PR #15688:
URL: https://github.com/apache/kafka/pull/15688#issuecomment-2090947138
Hi @kirktrue - It was clearly documented why LegacyKafkaConsumer would do this, maybe it is because in some scenarios users want to update the position but actually don't care about the offset results. This is the snippet from the LegacyKafkaConsumer code:
```
// if timeout is set to zero, do not try to poll the network client at all
// and return empty immediately; otherwise try to get the results synchronously
// and throw timeout exception if it cannot complete in time
if (timer.timeoutMs() == 0L)
return result;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org