You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Kirk True (Jira)" <ji...@apache.org> on 2022/11/07 18:45:00 UTC

[jira] [Created] (KAFKA-14365) Refactor Fetcher to allow different implementations

Kirk True created KAFKA-14365:
---------------------------------

             Summary: Refactor Fetcher to allow different implementations
                 Key: KAFKA-14365
                 URL: https://issues.apache.org/jira/browse/KAFKA-14365
             Project: Kafka
          Issue Type: Improvement
          Components: clients, consumer
            Reporter: Kirk True
            Assignee: Kirk True


The `Fetcher` API is used internally by the `KafkaConsumer` to fetch records from the brokers. There is ongoing work to create a new consumer implementation with a significantly refactored threading model. The threading refactor work requires a similarly refactored `Fetcher`. In order to keep the existing `KafkaConsumer` as untouched as possible, this Jira proposes to refactor the `Fetcher` so as to allow other implementations to use the unit tests and `KafkaConsumer`.

Here are the proposed steps:
 # Extract out the common APIs used by the `KafkaConsumer` and related unit tests into a new Java interface named `Fetcher`
 # Rename the existing `Fetcher` as `KafkaFetcher` (or similar)
 # Refactor the `KafkaConsumer`, `FetcherTest`, and other call sites to primarily use the new `Fetcher` interface

A future pull request will add the new `Fetcher` implementation and tie it in to the existing `FetcherTest` tests.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)