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

Java API needs Encoder / Decoder interfaces

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 0.8.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The current 0.8 API requires that a serializer class implements a constructor that takes a single VerifiableProperties argument. The built-in scala serializers default this argument to null. But when implementing a custom encoder from Java you won't get any compilation errors. However, at runtime you'll get a NoSuchMethodException when the Kafka producer tries to instantiate the class.

      If this is actually a dependency for the serialization classes it should be made more clear for Java API usage. I could see adding an abstract base class or perhaps an init(VerifiableProperties props) method.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xavier.stevens Xavier Stevens
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: