mirror of https://github.com/apache/kafka.git
MINOR: cleanup for postProcessAndValidateIdempotenceConfigs method (#12069)
Reviewers: Luke Chen <showuon@gmail.com>
This commit is contained in:
parent
25457377e3
commit
6b07f42ecd
|
@ -490,11 +490,11 @@ public class ProducerConfig extends AbstractConfig {
|
||||||
if (userConfiguredIdempotence) {
|
if (userConfiguredIdempotence) {
|
||||||
throw new ConfigException("Must set " + RETRIES_CONFIG + " to non-zero when using the idempotent producer.");
|
throw new ConfigException("Must set " + RETRIES_CONFIG + " to non-zero when using the idempotent producer.");
|
||||||
}
|
}
|
||||||
log.info("Idempotence will be disabled because {} is set to 0.", RETRIES_CONFIG, retries);
|
log.info("Idempotence will be disabled because {} is set to 0.", RETRIES_CONFIG);
|
||||||
shouldDisableIdempotence = true;
|
shouldDisableIdempotence = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
final short acks = Short.valueOf(acksStr);
|
final short acks = Short.parseShort(acksStr);
|
||||||
if (acks != (short) -1) {
|
if (acks != (short) -1) {
|
||||||
if (userConfiguredIdempotence) {
|
if (userConfiguredIdempotence) {
|
||||||
throw new ConfigException("Must set " + ACKS_CONFIG + " to all in order to use the idempotent " +
|
throw new ConfigException("Must set " + ACKS_CONFIG + " to all in order to use the idempotent " +
|
||||||
|
|
Loading…
Reference in New Issue