Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6161

Add default implementation to close() and configure() for Serializer, Deserializer and Serde

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.3.0
    • clients, streams

    Description

      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:

      @Override
      public void configure(Map<String, ?> configs, boolean isKey) {
          // nothing to do
      }
      
      @Override
      public void close() {
          // nothing to do
      }
      

      To avoid such boilerplate, we may create new interfaces (like UnconfiguredSerializer), in which we will define these methods empty.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            chia7712 Chia-Ping Tsai
            evis Evgeny Veretennikov
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment