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

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: clients, streams
    • Labels:

      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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: