kkonstantine commented on a change in pull request #8604: URL: https://github.com/apache/kafka/pull/8604#discussion_r443970569
########## File path: core/src/main/scala/kafka/tools/ConsoleConsumer.scala ########## @@ -560,16 +561,15 @@ class LoggingMessageFormatter extends MessageFormatter with LazyLogging { } class NoOpMessageFormatter extends MessageFormatter { - override def init(props: Properties): Unit = {} def writeTo(consumerRecord: ConsumerRecord[Array[Byte], Array[Byte]], output: PrintStream): Unit = {} } class ChecksumMessageFormatter extends MessageFormatter { private var topicStr: String = _ - override def init(props: Properties): Unit = { - topicStr = props.getProperty("topic") + override def configure(configs: Map[String, _]): Unit = { + topicStr = configs.get("topic").toString Review comment: can we add a test? ########## File path: core/src/main/scala/kafka/tools/ConsoleConsumer.scala ########## @@ -560,16 +561,15 @@ class LoggingMessageFormatter extends MessageFormatter with LazyLogging { } class NoOpMessageFormatter extends MessageFormatter { - override def init(props: Properties): Unit = {} def writeTo(consumerRecord: ConsumerRecord[Array[Byte], Array[Byte]], output: PrintStream): Unit = {} } class ChecksumMessageFormatter extends MessageFormatter { private var topicStr: String = _ - override def init(props: Properties): Unit = { - topicStr = props.getProperty("topic") + override def configure(configs: Map[String, _]): Unit = { + topicStr = configs.get("topic").toString Review comment: do we risk NPE here? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org