[ 
https://issues.apache.org/jira/browse/KAFKA-7332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621050#comment-16621050
 ] 

Dong Lin commented on KAFKA-7332:
---------------------------------

[~wushujames] The problem described in KAFKA-4808 says that user today has to 
wait for timeout if they produce to a compacted topic without key and it should 
be better to throw non-retriable exception immediately without timeout. From 
design perspective, I think the idea make sense and it is good to address that.

In terms of its impact in practice, I personally don't find that issue to be 
important because in all cases I can think of (please correct me if I am 
wrong), the issue only happens the first time when user setups a new workflow 
and tries to produce to a compacted topic with null key. It is probably OK for 
user to spend a minute or so to receive this first error given that it probably 
takes much longer time to create and debug a new workflow anyway. Thus it may 
not be worthwhile to add a new exception to address that problem.

So it is nice to address KAFKA-4808 if other developers are interested in 
pushing progress for KAFKA-4808.

 

 

> Improve error message when trying to produce message without key for 
> compacted topic
> ------------------------------------------------------------------------------------
>
>                 Key: KAFKA-7332
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7332
>             Project: Kafka
>          Issue Type: Improvement
>          Components: producer 
>    Affects Versions: 1.1.0
>            Reporter: Patrik Kleindl
>            Assignee: Manikumar
>            Priority: Trivial
>             Fix For: 2.1.0
>
>
> Goal:
> Return a specific error message like e.g. "Message without a key is not valid 
> for a compacted topic" when trying to produce such a message instead of a 
> CorruptRecordException.
>  
> > Yesterday we had the following exception:
> > 
> > Exception thrown when sending a message with key='null' and payload='...'
> > to topic sometopic:: org.apache.kafka.common.errors.CorruptRecordException:
> > This message has failed its CRC checksum, exceeds the valid size, or is
> > otherwise corrupt.
> > 
> > The cause was identified with the help of
> > 
> >[https://stackoverflow.com/questions/49098274/kafka-stream-get-corruptrecordexception]
> > 
> > Is it possible / would it makes sense to open an issue to improve the error
> > message for this case?
> > A simple "Message without a key is not valid for a compacted topic" would
> > suffice and point a user  in the right direction.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to