You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Evan Huus <ea...@gmail.com> on 2015/01/31 19:51:58 UTC

Re: [kafka-clients] is RequestTimedOut (error code: 7) retryable in producer?

Hi there,

As far as I know, RequestTimedOut is returned exclusively when the
`Timeout` value provided in a Produce Request is exceeded. The message
will likely still be committed on the local broker, but it means that
some replicas may not have received it yet. I'm honestly not sure what
the use case is for this particular feature, but perhaps somebody else
can explain.

Sarama's choice to retry on `UnknownTopicOrPartition` is probably
unnecessary - I'm not actually sure that code could ever be hit, since
in that case the same error would be raised earlier probably via the
call to `assignPartitions`. Certainly the two important ones are
`LeaderNotAvailable` and `NotLeaderForPartition`.

Evan

On Sat, Jan 31, 2015 at 8:19 AM, DeJiang Zhu <do...@gmail.com> wrote:
> Hi all,
>
> I'm working on implementing a lua kafka client [1], but I'm getting
> confused: what does `RequestTimedOut` exactly mean.
>
> At first, from The Kafka Protocal [2], I thought producer should retry when
> received `RequestTimedOut`.
>
> But later, I found sometimes the messages may have `commited` as well even I
> got `RequestTimedOut`, while sometimes not
>
> Also, in sarama[3], retry happens only on `UnknownTopicOrPartition,
> NotLeaderForPartition, LeaderNotAvailable` error code;only
> `LeaderNotAvailableException` and `NotLeaderForPartitionException` extends
> `RetryAbleException` in kafka[4]
>
> I wonder did I misunderstood The Kafka Protocal or was I wrong on something
> else I haven't realized.
>
> Looking forward to a reply. Thank you guys in advance. :)
>
>
> [1] https://github.com/doujiang24/lua-resty-kafka
> [2]
> https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol
> [3] https://github.com/Shopify/sarama
> [4] https://github.com/apache/kafka
>
> --
> You received this message because you are subscribed to the Google Groups
> "kafka-clients" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kafka-clients+unsubscribe@googlegroups.com.
> To post to this group, send email to kafka-clients@googlegroups.com.
> Visit this group at http://groups.google.com/group/kafka-clients.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kafka-clients/CAEZxTmk8YsF3T%2BENcmoVCidOctnbS6wAa08ap9agFP0B7tOXKA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.