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

Retry connect internal topics' creation in case of InvalidReplicationFactorException

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.6.0
    • connect

    Description

      In case the Kafka Broker cluster and the Kafka Connect cluster is started together and Connect would want to create its topics, there's a high chance to fail the creation with InvalidReplicationFactorException.

      ERROR org.apache.kafka.connect.runtime.distributed.DistributedHerder [Worker clientId=connect-1, groupId=connect-cluster] Uncaught exception in herder work thread, exiting: 
      org.apache.kafka.connect.errors.ConnectException: Error while attempting to create/find topic(s) 'connect-offsets'
      ...
      Caused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 3 larger than available brokers: 2.
      

      Introducing a retry logic here would make Connect a bit more robust.

      The commit uses default.api.timeout.ms and retry.backoff.ms configs to control the retry mechanism.

      Attachments

        Issue Links

          Activity

            People

              akatona Andras Katona
              akatona Andras Katona
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: