Thanks, @bbejeck !

@joan38 hmm. I'm not sure why it wouldn't work. All it's saying is that we want:
* a Serde for exactly K
* a Serde for exactly V
* a partitioner (function) that takes 1: anything that can be assigned to K and 
2: anything that can be assigned to V

This seems like a perfectly reasonable set of constraints, and it accurately 
reflects our actual constraints:
* when we're serializing/deserializing, we need to have the exact right serde 
for the type in question, otherwise, we'll lose some information when we 
round-trip
* when we're picking a partition, we don't need exactly K and V, but we are 
processing a <K,V> document, so we need to be able to pass (k:K,v:V) arguments 
to the partition function. But if you want to write a more generic partition 
function that, say, picks partitions for any `Object` based on its `hashCode`, 
then this is fine by us.

I bet that there's some tricky type-bound scala syntax that will make it work. 
If you run out of ideas, I can try pulling the PR down and banging my head 
against it, too.

[ Full content available at: https://github.com/apache/kafka/pull/5551 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to