vvcephei commented on pull request #11767:
URL: https://github.com/apache/kafka/pull/11767#issuecomment-1041059391
This issue surfaced in Confluent's ksqlDB. Once ksqlDB started to build
against Kafka post-#11691, it crashes with:
```
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.slf4j.impl.Log4jLoggerFactory.<init>(Log4jLoggerFactory.java:66)
at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
at
org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at
io.confluent.ksql.rest.server.KsqlServerMain.<clinit>(KsqlServerMain.java:39)
Caused by: org.apache.kafka.common.config.ConfigException: Must set acks to
all in order to use the idempotent producer. Otherwise we cannot guarantee
idempotence.
at
org.apache.kafka.clients.producer.ProducerConfig.postProcessAndValidateIdempotenceConfigs(ProducerConfig.java:475)
at
org.apache.kafka.clients.producer.ProducerConfig.postProcessParsedConfig(ProducerConfig.java:443)
at
org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:114)
at
org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:133)
at
org.apache.kafka.clients.producer.ProducerConfig.<init>(ProducerConfig.java:511)
at
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:289)
at
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:316)
at
org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:301)
at
org.apache.kafka.log4jappender.KafkaLog4jAppender.getKafkaProducer(KafkaLog4jAppender.java:341)
at
org.apache.kafka.log4jappender.KafkaLog4jAppender.activateOptions(KafkaLog4jAppender.java:335)
at
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
```
I would expect any other project using the `KafkaLog4JAppender` to
experience the same behavior.
I'm not sure why the KafkaLog4JAppender originally overrode the acks to 1,
but it's certainly incompatible with the new idempotence default. An
alternative would be to leave acks=1 and disable idempotence, but I figured
fewer overrides make the appender easier to reason about.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]