kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-8431) Add a onTimeoutExpired callback to Kafka Consumer
Date Sun, 26 May 2019 15:56:00 GMT
Richard Yu created KAFKA-8431:

             Summary: Add a onTimeoutExpired callback to Kafka Consumer
                 Key: KAFKA-8431
                 URL: https://issues.apache.org/jira/browse/KAFKA-8431
             Project: Kafka
          Issue Type: Improvement
          Components: consumer
            Reporter: Richard Yu

Currently, after the changes introduced in KIP-266, many methods in Kafka Consumer have a
bounded execution time given by a user specified {{Duration}} parameter. However, in some
cases, some methods could not perform their operations in the allocated timeout. In this
case, the user might wish to have a {{onTimeoutExpired}} callback which would be called should
a blocking method timeout before any results could be returned. 

The user can implement something like described above, but Kafka can spare the user the necessity
of coding such a feature if we can support one by itself.

One possible use of this callback is to retry the method (e.g. the {{onTimeoutExpired}} callback
triggers another call to the same method after some allocated time).

This message was sent by Atlassian JIRA

View raw message