[
https://issues.apache.org/jira/browse/KAFKA-998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13749876#comment-13749876
]
Jason Rosenberg commented on KAFKA-998:
---------------------------------------
The caller of Producer.send() should also have the ability to know whether a
send failure is recoverable (that might succeed with more retries). It may be
hard for the client developer to guess the right number of
message.send.max.retries, otherwise (since a transient error, like a restarting
broker, could take an unknown amount of time). If I want to implement
guaranteed semantics, then the client needs to be able to have information on
whether to continue retrying a message, or else give up.
This could be done by having Producer.send() throw different exception types
(e.g. different versions of FailedToSendMessageException), e.g.
UnrecoverableFailedToSendException or RetriesExhaustedFailedToSendException
(perhaps shorter names for these exceptions). These could both be sub-classes
of FailedToSendException.
Another approach might be to have the FailedToSendException return information,
such as how many retries were attempted, whether or not the message might be
recoverable with more retries, and it should wrap the root cause, so debugging
is possible.
> Producer should not retry on non-recoverable error codes
> --------------------------------------------------------
>
> Key: KAFKA-998
> URL: https://issues.apache.org/jira/browse/KAFKA-998
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.8, 0.8.1
> Reporter: Joel Koshy
> Assignee: Guozhang Wang
> Attachments: KAFKA-998.v1.patch
>
>
> Based on a discussion with Guozhang. The producer currently retries on all
> error codes (including messagesizetoolarge which is pointless to retry on).
> This can slow down the producer unnecessarily.
> If at all we want to retry on that error code we would need to retry with a
> smaller batch size, but that's a separate discussion.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira