You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "David Jacot (Jira)" <ji...@apache.org> on 2020/11/18 20:26:00 UTC

[jira] [Created] (KAFKA-10742) Automated protocol should support java.util.Optional

David Jacot created KAFKA-10742:
-----------------------------------

             Summary: Automated protocol should support java.util.Optional
                 Key: KAFKA-10742
                 URL: https://issues.apache.org/jira/browse/KAFKA-10742
             Project: Kafka
          Issue Type: Improvement
            Reporter: David Jacot
            Assignee: David Jacot


The AK protocol often relies on sentinel value (e.g. null or -1) to indicate that a field was not provided. Usually, these sentinels are turned into java.util.Optional that is empty when the field is equal to the sentinel. Until now, we were doing this transformation while mapping the Struct to internal Request or Response classes. With the generated protocol, we would like to get rid of these internal classes and also avoid spending time to construct them.

To get there, the automated protocol should support java.util.Optional.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)