[
https://issues.apache.org/jira/browse/KAFKA-7332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621106#comment-16621106
]
James Cheng commented on KAFKA-7332:
------------------------------------
Thanks [~lindong]. I agree with you that design-wise it makes sense, and
practice-wise, I'm not sure.
KAFKA-4808 says that you need to exhaust retries or request.timeout.ms expires.
I'm not sure how those two interact. Is the request.timeout.ms a per-request
thing and so you actually have to wait for (retries * request.timeout.ms)?
According to
[https://docs.confluent.io/current/streams/developer-guide/config-streams.html,]
kafka streams has retries = 10. And in kafka 2.0.0, producer
request.timeout.ms = 30 seconds. If you multiple those together, you get 5
minutes until you get a timeout. As you said, it's probably small compared to
working through other workflow stuff, but 5 minutes is quite a while to wait to
get an error. I would probably end up killing my application repeatedly
thinking that something else was wrong, and might not ever get to the 5 minutes.
I don't think I've personally run into this. I'm just thinking through what
the developer experience would be. [~gwenshap] ran into it recently, but again,
not sure how much more widely this happens.
> 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)