diff --git a/docs/upgrade.html b/docs/upgrade.html
index 02a5405522d..9e0699cbabc 100644
--- a/docs/upgrade.html
+++ b/docs/upgrade.html
@@ -33,6 +33,15 @@
org.apache.kafka.tools.api.RecordReader
interface to build custom readers for the kafka-console-producer
tool.
+
+ The kafka.tools.DefaultMessageFormatter
class has been removed. Please use the org.apache.kafka.tools.consumer.DefaultMessageFormatter
class instead.
+
+
+ The kafka.tools.LoggingMessageFormatter
class has been removed. Please use the org.apache.kafka.tools.consumer.LoggingMessageFormatter
class instead.
+
+
+ The kafka.tools.NoOpMessageFormatter
class has been removed. Please use the org.apache.kafka.tools.consumer.NoOpMessageFormatter
class instead.
+
diff --git a/tools/src/main/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptions.java b/tools/src/main/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptions.java
index b4328cc7f69..b3c7a1d1550 100644
--- a/tools/src/main/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptions.java
+++ b/tools/src/main/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptions.java
@@ -353,18 +353,6 @@ public final class ConsoleConsumerOptions extends CommandDefaultOptions {
private static String convertDeprecatedClass(String className) {
switch (className) {
- case "kafka.tools.DefaultMessageFormatter":
- System.err.println("WARNING: kafka.tools.DefaultMessageFormatter is deprecated and will be removed in the next major release. " +
- "Please use org.apache.kafka.tools.consumer.DefaultMessageFormatter instead");
- return DefaultMessageFormatter.class.getName();
- case "kafka.tools.LoggingMessageFormatter":
- System.err.println("WARNING: kafka.tools.LoggingMessageFormatter is deprecated and will be removed in the next major release. " +
- "Please use org.apache.kafka.tools.consumer.LoggingMessageFormatter instead");
- return LoggingMessageFormatter.class.getName();
- case "kafka.tools.NoOpMessageFormatter":
- System.err.println("WARNING: kafka.tools.NoOpMessageFormatter is deprecated and will be removed in the next major release. " +
- "Please use org.apache.kafka.tools.consumer.NoOpMessageFormatter instead");
- return NoOpMessageFormatter.class.getName();
case "kafka.coordinator.transaction.TransactionLog$TransactionLogMessageFormatter":
System.err.println("WARNING: kafka.coordinator.transaction.TransactionLog$TransactionLogMessageFormatter is deprecated and will be removed in the next major release. " +
"Please use org.apache.kafka.tools.consumer.TransactionLogMessageFormatter instead");
diff --git a/tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptionsTest.java b/tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptionsTest.java
index a4a24c60003..0425b22f929 100644
--- a/tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptionsTest.java
+++ b/tools/src/test/java/org/apache/kafka/tools/consumer/ConsoleConsumerOptionsTest.java
@@ -648,15 +648,15 @@ public class ConsoleConsumerOptionsTest {
}
@Test
- public void testParseDeprecatedFormatter() throws Exception {
- String[] deprecatedDefaultMessageFormatter = generateArgsForFormatter("kafka.tools.DefaultMessageFormatter");
- assertInstanceOf(DefaultMessageFormatter.class, new ConsoleConsumerOptions(deprecatedDefaultMessageFormatter).formatter());
+ public void testParseFormatter() throws Exception {
+ String[] defaultMessageFormatter = generateArgsForFormatter("org.apache.kafka.tools.consumer.DefaultMessageFormatter");
+ assertInstanceOf(DefaultMessageFormatter.class, new ConsoleConsumerOptions(defaultMessageFormatter).formatter());
- String[] deprecatedLoggingMessageFormatter = generateArgsForFormatter("kafka.tools.LoggingMessageFormatter");
- assertInstanceOf(LoggingMessageFormatter.class, new ConsoleConsumerOptions(deprecatedLoggingMessageFormatter).formatter());
+ String[] loggingMessageFormatter = generateArgsForFormatter("org.apache.kafka.tools.consumer.LoggingMessageFormatter");
+ assertInstanceOf(LoggingMessageFormatter.class, new ConsoleConsumerOptions(loggingMessageFormatter).formatter());
- String[] deprecatedNoOpMessageFormatter = generateArgsForFormatter("kafka.tools.NoOpMessageFormatter");
- assertInstanceOf(NoOpMessageFormatter.class, new ConsoleConsumerOptions(deprecatedNoOpMessageFormatter).formatter());
+ String[] noOpMessageFormatter = generateArgsForFormatter("org.apache.kafka.tools.consumer.NoOpMessageFormatter");
+ assertInstanceOf(NoOpMessageFormatter.class, new ConsoleConsumerOptions(noOpMessageFormatter).formatter());
}
@SuppressWarnings("deprecation")