You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "M. Manna" <ma...@gmail.com> on 2018/05/31 13:54:29 UTC

Round-Robin assignment when non-nullable record key

Hello,

I can see the this has been set as "KIP required".

https://issues.apache.org/jira/browse/KAFKA-3333

I have a use case where I simply want to use the key as some metadata
information (but not really for any messages), but ideally would like to
round-robin partition assignment. All I understand is, unless a hash
collision happens, a key will have a specific partition

Could a PMC member please confirm if a KIP has been made available for
voting etc., or is this still pending?

Also, is it meanwhile safe to extends DefaultPartitioner and use
round-robin condition for both Null/non-null keys as override?

Regards,

Re: Round-Robin assignment when non-nullable record key

Posted by "Matthias J. Sax" <ma...@confluent.io>.
You can also pass in a custom partitioner instead of using the default
partitioner.


-Matthias

On 5/31/18 7:39 AM, Hans Jespersen wrote:
> Why don’t to just put the metadata in the header and leave the key null so it defaults to round robin?
> 
> -hans
> 
>> On May 31, 2018, at 6:54 AM, M. Manna <ma...@gmail.com> wrote:
>>
>> Hello,
>>
>> I can see the this has been set as "KIP required".
>>
>> https://issues.apache.org/jira/browse/KAFKA-3333
>>
>> I have a use case where I simply want to use the key as some metadata
>> information (but not really for any messages), but ideally would like to
>> round-robin partition assignment. All I understand is, unless a hash
>> collision happens, a key will have a specific partition
>>
>> Could a PMC member please confirm if a KIP has been made available for
>> voting etc., or is this still pending?
>>
>> Also, is it meanwhile safe to extends DefaultPartitioner and use
>> round-robin condition for both Null/non-null keys as override?
>>
>> Regards,


Re: Round-Robin assignment when non-nullable record key

Posted by Hans Jespersen <ha...@confluent.io>.
Why don’t to just put the metadata in the header and leave the key null so it defaults to round robin?

-hans

> On May 31, 2018, at 6:54 AM, M. Manna <ma...@gmail.com> wrote:
> 
> Hello,
> 
> I can see the this has been set as "KIP required".
> 
> https://issues.apache.org/jira/browse/KAFKA-3333
> 
> I have a use case where I simply want to use the key as some metadata
> information (but not really for any messages), but ideally would like to
> round-robin partition assignment. All I understand is, unless a hash
> collision happens, a key will have a specific partition
> 
> Could a PMC member please confirm if a KIP has been made available for
> voting etc., or is this still pending?
> 
> Also, is it meanwhile safe to extends DefaultPartitioner and use
> round-robin condition for both Null/non-null keys as override?
> 
> Regards,