[
https://issues.apache.org/jira/browse/KAFKA-19279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18022476#comment-18022476
]
Mickael Maison commented on KAFKA-19279:
----------------------------------------
This class was not public and we don't mean to make it public. If you have a
use case and motivation to do so, please open a KIP, see
https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals
In the meantime, I'll close this as won't do.
> DefaultMessageFormatter is inaccessible as it's package-private class
> ---------------------------------------------------------------------
>
> Key: KAFKA-19279
> URL: https://issues.apache.org/jira/browse/KAFKA-19279
> Project: Kafka
> Issue Type: Bug
> Components: tools
> Affects Versions: 3.9.0
> Reporter: Aniruddha Navare
> Priority: Major
>
> As per [upgrade-notes|
> https://github.com/apache/kafka/blob/ec70c4436210b7578777739091e365b03c69946f/docs/upgrade.html#L259],
> it has been told as below
> {code:java}
> kafka.tools.DefaultMessageFormatter{code}
> class was removed.
>
> Please use the
> {code:java}
> org.apache.kafka.tools.consumer.DefaultMessageFormatter{code}
> class instead.
>
>
> Now
> {code:java}
> org.apache.kafka.tools.consumer.DefaultMessageFormatter{code}
> is package-private class which means, we can't directly use it as below
>
> {code:java}
> private val defaultFormatter: DefaultMessageFormatter = new
> DefaultMessageFormatter {code}
>
> It throws error as
> {code:java}
> Symbol DefaultMessageFormatter is inaccessible from this place {code}
> Due ot this, we can't use other member variable `printHeaders`.
>
> This is happened when we upgraded kafka-tools from 3.4.1 to 3.9.0 version.
>
> Need help in this regarding.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)