Steven Zhang created KAFKA-9511:
-----------------------------------

             Summary: Return more specific error and message when 
producer.initTransaction fails due to missing Kafka configs
                 Key: KAFKA-9511
                 URL: https://issues.apache.org/jira/browse/KAFKA-9511
             Project: Kafka
          Issue Type: Improvement
            Reporter: Steven Zhang


If a user is running a single Kafka broker and tries to initialize a 
transaction without setting the following configs to 1:

- transaction.state.log.replication.factor

- transaction.state.log.min.isr

- offsets.topic.replication.factor

The initTransactions() fails and a very generic TimeoutException is returned. 
This is because the default values are greater than 1 and need to be overridden 
in order for the transactions to properly work with a single broker.

The only way for the user to figure out the issue is to look into the logs and 
see the following error logs.
ERROR [KafkaApi-1] Number of alive brokers '1' does not meet the required 
replication factor '3' for the transactions state topic (configured via 
'transaction.state.log.replication.factor'). This error can be ignored if the 
cluster is starting up and not all brokers are up yet. (kafka.server.KafkaApis)
Although this is specific to scenarios where there's only a single Kafka Broker 
running, it would help improve usability if the error was clearer. A 
"CoordinatorNotAvailableException" could be returned with a clear error message 
indicating the configs need to be set if the user intends to only run a single 
broker



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to