You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2019/02/21 17:06:00 UTC

[jira] [Resolved] (KAFKA-6161) Add default implementation to close() and configure() for Serializer, Deserializer and Serde

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

Guozhang Wang resolved KAFKA-6161.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.0

> Add default implementation to close() and configure() for Serializer, Deserializer and Serde
> --------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-6161
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6161
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients, streams
>            Reporter: Evgeny Veretennikov
>            Assignee: Chia-Ping Tsai
>            Priority: Major
>              Labels: kip
>             Fix For: 2.3.0
>
>
> {{Serializer}}, {{Deserializer}} and {{Serde}} interfaces have methods {{configure()}} and {{close()}}. Pretty often one want to leave these methods empty. For example, a lot of serializers inside {{org.apache.kafka.common.serialization}} package have these methods empty:
> {code}
> @Override
> public void configure(Map<String, ?> configs, boolean isKey) {
>     // nothing to do
> }
> @Override
> public void close() {
>     // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)