...
add a new Exception, InconsistentReplicaConfigurationException, to be thrown when a client produce with acks=all on a topic where min.insync.replicas > replication.factor. This exception extends ApiException and is not retriable.
Code Block language java title InconsistentReplicaConfigurationExceptionInconsistentReplicationFactorException.java collapse true public class InconsistentReplicaConfigurationExceptionInconsistentReplicationFactorException extends ApiException { ... }
...
add a new client-server Error, INCONSISTENT_REPLICA_CONFIGURATION(89)
Code Block language java title Errors.java collapse true INCONSISTENT_REPLICAREPLICATION_CONFIGURATIONFACTOR(89, "Replication factor is set lower than min.isr. Acks requirements cannot be satisfied.", InconsistentReplicaConfigurationException::new);
update public doc for min.insync.replicas:
val MinInSyncReplicasDoc = "When a producer sets acks to \"all\" (or \"-1\"), " +
"min.insync.replicas specifies the minimum number of replicas that must acknowledge " +
"a write for the write to be considered successful. If this minimum cannot be met, " +
"then the producer will raise an exception (either NotEnoughReplicas or " +
"NotEnoughReplicasAfterAppend).<br>When used together, min.insync.replicas and acks " +
"then the producer will raise an exception (InconsistentReplicaConfigurationExceptionInconsistentReplicationFactorException)." +
"<br>When used together, min.insync.replicas and acks " +
"allow you to enforce greater durability guarantees. A typical scenario would be to " +
"create a topic with a replication factor of 3, set min.insync.replicas to 2, and " +
"produce with acks of \"all\". This will ensure that the producer raises an exception " +
"if a majority of replicas do not receive a write.
...
Clients expecting an error when producing on a topic with acks=all will receive INCONSISTENT_REPLICAREPLICATION_CONFIGURATIONFACTOR(89) instead of NOT_ENOUGH_REPLICAS (19) in the Java client (new Exception is not retriable) in case of the aforementioned configuration mismatch.
...