Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14246 Update threading model for Consumer
  3. KAFKA-14247

Implement EventHandler interface and DefaultEventHandler for Consumer

    XMLWordPrintableJSON

Details

    Description

      The background thread runs inside of the DefaultEventHandler to consume events from the ApplicationEventQueue and produce events to the BackgroundEventQueue.

      The background thread runnable consist of a loop that tries to poll events from the ApplicationQueue, processes the event if there are any, and poll networkClient.

      In this implementation, the DefaultEventHandler spawns a thread that runs the BackgroundThreadRunnable.  The runnable, as of the current PR, does the following things:

      1. Initialize the networkClient
      2. Poll ApplicationEvent from the queue if there's any
      3. process the event
      4. poll the networkClient

      PR: https://github.com/apache/kafka/pull/12672

      Attachments

        Activity

          People

            pnee Philip Nee
            pnee Philip Nee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: