KAFKA 8311: better handle timeout exception on Stream thread
The goals for this small diff are:
1. Give user guidance if they want to relax commit timeout threshold
2. Indicate the code path where timeout exception was caught
Reviewers: John Roesler Guozhang Wang
@@ -1770,7 +1770,8 @@ public class KafkaConsumer<K, V> implements Consumer<K, V> {
Collections.singleton(partition), time.timer(timeout));
if (offsets == null) {
throw new TimeoutException("Timeout of " + timeout.toMillis() + "ms expired before the last " +
- "committed offset for partition " + partition + " could be determined");
+ "committed offset for partition " + partition + " could be determined. Try tuning default.api.timeout.ms " +
+ "larger to relax the threshold.");
} else {
offsets.forEach(this::updateLastSeenEpochIfNewer);
return offsets.get(partition);
