[ https://issues.apache.org/jira/browse/KAFKA-8455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16948595#comment-16948595 ]
ASF GitHub Bot commented on KAFKA-8455: --------------------------------------- nizhikov commented on pull request #7485: KAFKA-8455: Add VoidSerde to Serdes URL: https://github.com/apache/kafka/pull/7485 As discussed in [KIP-527](https://cwiki.apache.org/confluence/display/KAFKA/KIP-527%3A+Add+NothingSerde+to+Serdes) this PR introduces new VoidSerde. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add VoidSerde to Serdes > ----------------------- > > Key: KAFKA-8455 > URL: https://issues.apache.org/jira/browse/KAFKA-8455 > Project: Kafka > Issue Type: Improvement > Components: streams > Reporter: John Roesler > Assignee: Nikolay Izhikov > Priority: Minor > Labels: beginner, needs-kip, newbie, newbie++ > > Often, when reading an input topic, the key is expected to be null, but > there's actually no way to represent this fact in Consumed, leading to > confusing type signatures down the topology. > For example, you might use the BytesSerde, but then you have a > KStream<Bytes,...>. When maintaining a large application, this becomes a > hazard, since you'd need to "be really careful" not to try and dereference > the key at any point, since you actually know it's always null. > Much better would be to actually represent the fact that the key is null, > using the Void type. One such example of this is the NothingSerde I wrote > here: > https://github.com/confluentinc/kafka-streams-examples/blob/5.2.1-post/src/test/java/io/confluent/examples/streams/IntegrationTestUtils.java#L465 > After some conversations, I've come to believe this would actually be a > useful addition to the main Serdes collection. -- This message was sent by Atlassian Jira (v8.3.4#803005)