You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2026/01/18 16:26:00 UTC

[jira] [Resolved] (KAFKA-20076) Wrong (uppercase) PluginType JSON serialization

     [ https://issues.apache.org/jira/browse/KAFKA-20076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chia-Ping Tsai resolved KAFKA-20076.
------------------------------------
    Resolution: Fixed

trunk: [https://github.com/apache/kafka/commit/494a2b9e244513c50b1997f24a9f97c961fe4da5]

4.2: https://github.com/apache/kafka/commit/ce5207afe8eefbe34f683c2e3e79c5dbba16a679

> Wrong (uppercase) PluginType JSON serialization
> -----------------------------------------------
>
>                 Key: KAFKA-20076
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20076
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 4.2.0
>            Reporter: Paolo Patierno
>            Assignee: Paolo Patierno
>            Priority: Major
>             Fix For: 4.2.0
>
>
> On trunk and current Kafka 4.2.0 RC0, when running Kafka Connect and submitting an HTTP GET request to the /connector-plugins endpoint, the JSON serialized "type" filed in the body response is now uppercase instead of being lowercase as in the past.
> Following a comparison between Apache Kafka 4.1 ...
> {code:java}
> [{"class":"org.apache.kafka.connect.mirror.MirrorCheckpointConnector","type":"source","version":"4.1.1"},{"class":"org.apache.kafka.connect.mirror.MirrorHeartbeatConnector","type":"source","version":"4.1.1"},{"class":"org.apache.kafka.connect.mirror.MirrorSourceConnector","type":"source","version":"4.1.1"}]
> {code}
> ... and the current Apache Kafka 4.2 RC0
> {code:java}
> [{"class":"org.apache.kafka.connect.mirror.MirrorCheckpointConnector","type":"SOURCE","version":"4.2.0"},{"class":"org.apache.kafka.connect.mirror.MirrorHeartbeatConnector","type":"SOURCE","version":"4.2.0"},{"class":"org.apache.kafka.connect.mirror.MirrorSourceConnector","type":"SOURCE","version":"4.2.0"}]
> {code}
> As you can see it's "source" vs "SOURCE". I had same result with "sink" vs "SINK".
> I think this is due to the last change from converting the PluginInfo from being a class to a record which had an impact together with the JSON serialization.
> When it was a class, a dedicated type.toString() was used which explicitly does a lower case transformation.
> As a record, the "type" field is directly serialized by JSON by using the enum values from PluginType which are all uppercase of course.
> It means that this issue affects all the other values as well the way they are serialized (not just SINK, SOURCE but also CONVERTER, TRANSFORMATION, and so on).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)