Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.7.0
Description
If a call to consumer.offsetsForTimes times out, the new AsyncKafkaConsumer will throw a org.apache.kafka.common.errors.TimeoutException as expected, but with the following as message: "java.util.concurrent.TimeoutException".
We should provide a clearer message, and I would even say we keep the same message that the LegacyConsumer shows in this case, ex: "Failed to get offsets by times in 60000ms".
To fix this we should consider catching the timeout exception in the consumer when offsetsForTimes result times out (here), and propagate it with the message specific to offsetsForTimes.
Same situation exists for beginningOffsets and endOffsets. All 3 funcs show the same timeout message in the LegacyConsumer (defined here), but do not have a clear message in the Async, so we should fix them all 3.
With the fix, we should write tests for each func, like the ones defined for the Legacy Consumer (here). Note that we would need different tests, added to AsyncKafkaConsumerTest, given that the AsyncKafkaConsumer issues a FindCoordinator request in this case (on manager poll), but the LegacyKafkaConsumer does not, so it does not account for that when matching requests/responses in the current tests.
Attachments
Issue Links
- links to