gharris1727 commented on code in PR #15922: URL: https://github.com/apache/kafka/pull/15922#discussion_r1599503091
########## log4j-appender/src/main/java/org/apache/kafka/log4jappender/KafkaLog4jAppender.java: ########## @@ -349,8 +349,14 @@ protected Producer<byte[], byte[]> getKafkaProducer(Properties props) { protected void append(LoggingEvent event) { String message = subAppend(event); LogLog.debug("[" + new Date(event.getTimeStamp()) + "]" + message); - Future<RecordMetadata> response = producer.send( - new ProducerRecord<>(topic, message.getBytes(StandardCharsets.UTF_8))); + Future<RecordMetadata> response; Review Comment: This is in the javadoc for send: ``` * @throws IllegalStateException if a transactional.id has been configured and no transaction has been started, or * when send is invoked after producer has been closed. ``` Idempotence and transactions are not in use for this producer. I am not aware of another cause of IllegalStateException that isn't documented, but the documentation could be wrong or there could be a bug, I have no idea. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org