Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-8431

Add a onTimeoutExpired callback to Kafka Consumer

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: consumer
    • Labels:

      Description

      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).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Yohan123 Richard Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: