You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "rameshkrishnan muthusamy (Jira)" <ji...@apache.org> on 2020/11/24 14:44:00 UTC

[jira] [Commented] (KAFKA-10315) Consider to throw exception for failed fetch requests

    [ https://issues.apache.org/jira/browse/KAFKA-10315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17238187#comment-17238187 ] 

rameshkrishnan muthusamy commented on KAFKA-10315:
--------------------------------------------------

[~showuon] [~mjsax] this is an important feature that is required even for a normal consumer to be able to distinguish between no records been fetched and n/w failure to the broker. 

> Consider to throw exception for failed fetch requests
> -----------------------------------------------------
>
>                 Key: KAFKA-10315
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10315
>             Project: Kafka
>          Issue Type: New Feature
>          Components: consumer
>            Reporter: Matthias J. Sax
>            Assignee: Luke Chen
>            Priority: Major
>              Labels: need-kip
>
> The current `Consumer#poll(Duration)` method is designed to block until data is available or the provided poll timeout expires. This implies, that if fetch requests fail the consumer retries them internally and eventually returns an empty set of records. – Thus, from a user point of view, returning an empty set of records can mean that no data is available broker side or that the broker cannot be reached.
> For Kafka Streams, this behavior is problematic as its runtime would like to distinguish both cases, to apply its own timeouts (cf https://issues.apache.org/jira/browse/KAFKA-9274).
> One idea to address this issue is to add a new method `Consumer#pollOnce()` that would throw an exception if a fetch request fails instead of retrying internally.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)