[ https://issues.apache.org/jira/browse/KAFKA-15056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17730199#comment-17730199 ]
Kirk True commented on KAFKA-15056: ----------------------------------- [~tophei] is this fixed by [KAFKA-13668|https://issues.apache.org/jira/browse/KAFKA-13668]? cc [~pnee] > Kafka producer still fails with ClusterAuthorizationException after > permission granted > -------------------------------------------------------------------------------------- > > Key: KAFKA-15056 > URL: https://issues.apache.org/jira/browse/KAFKA-15056 > Project: Kafka > Issue Type: Bug > Reporter: Jeff > Priority: Major > > Hi team, we are using kafka client 3.1.2 in the application, when initiating > a KafkaProducer without explicitly configuring idempotent write, it failed > with with ClusterAuthorizationException which is expected since idempotent > write is enabled by default. But after we granting the producer principal > IDEMPOTENT_WRITE permission, the producer still fails with same error until > we restarted the application and re-initiated the producer. > After checking the log and stacktrace, the code fails at this line > [https://github.com/apache/kafka/blame/3.1.2/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java#L1000] > and in turn throws exception at this line > [https://github.com/apache/kafka/blob/3.1.2/clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java#L1125] > It appears the acl check is not happening at runtime dynamically, considering > the 'currentState' was still not set to a correct value after permission > granted. Besides, do we omit the checking of > 'transactionManager.isTransaction()' at this line on purpose in 3.1.2? > [https://github.com/apache/kafka/blob/3.1.0/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java#LL988C70-L988C70] > This checking seemed to make sense since only transactional producer need > further call 'transactionManager.maybeAddPartitionToTransaction(tp);'? -- This message was sent by Atlassian Jira (v8.20.10#820010)