KAFKA-13598: set log4j appender to default acks#11767
Conversation
|
This issue surfaced in Confluent's ksqlDB. Once ksqlDB started to build against Kafka post-#11691, it crashes with: I would expect any other project using the 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. |
There was a problem hiding this comment.
@vvcephei , there's a getter API getRequiredNumAcks in KafkaLog4jAppender. After this change, the user would get default null from it if no override. I'm thinking we should set the default acks value to -1 or disable idempotenece here. WDYT?
|
Thanks, @showuon ! I noticed that also, but there are also a whole bunch of other nullable object references with primitive-typed getters in that class, so I figured it was just some funky log4j thing. I figured out that the setter is used by log4 to apply the configuration (for example, |
|
Yes, I don't know the getters serve any purpose, either. But I'm still worried that there's someone relying on it. |
Unfair to mention a PR from 4 years ago 😉 . Regardless whether anyone actually uses this class, it does seem weird to have getters that we know are broken. I agree it seems better to initialize the defaults explicitly (and to use types consistently). Perhaps we may as well fix the other broken getters while we're at it. At a quick glance, it looks like |
|
Closing in favor of https://issues.apache.org/jira/browse/KAFKA-13673 / #11788 |
After #11691, the
KafkaLog4JAppender causes the process to crash due
to the mismatch between the new produce default
idempotent mode and the appender's overridden
acks=1property.acks=1override, so the appender fallsback on the producer's default acks config.
Committer Checklist (excluded from commit message)