It looks like you are right, the throttle time does come first. I have a
WIP implementation (https://github.com/apache/kafka/pull/970) that
generates the protocol docs based on the protocol specification in the code
and the output for fetch response v2 is:

> Fetch Response (Version: 2) => throttle_time_ms [responses]
>   responses => topic [partition_responses]
>     partition_responses => partition error_code high_watermark record_set
>       partition => INT32
>       error_code => INT16
>       high_watermark => INT64
>       record_set => BYTES
>     topic => STRING
>   throttle_time_ms => INT32
>
> I don't think that was intentional though, because the similar produce
response puts it on the end like documented:

> Produce Response (Version: 2) => [responses] throttle_time_ms
>   responses => topic [partition_responses]
>     partition_responses => partition error_code base_offset timestamp
>       partition => INT32
>       error_code => INT16
>       base_offset => INT64
>       timestamp => INT64
>     topic => STRING
>   throttle_time_ms => INT32
>
> However, even if it was a mistake it wont change until at least the next
protocol bump for fetch. Is it important to you that it be at the end
functionally? Or just that the documentation is correct?

Thanks,
Grant



On Thu, Mar 3, 2016 at 2:49 AM, Oleksiy Krivoshey <oleks...@gmail.com>
wrote:

> It seems that Fetch Response V1 is not correctly documented:
>
>
> https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol
>
> It says the response should be:
>
> FetchResponse => [TopicName [Partition ErrorCode HighwaterMarkOffset
> MessageSetSize MessageSet]] ThrottleTime
>
> But it actually is (as of Kafka 0.9.0.1):
>
> FetchResponse => ThrottleTime [TopicName [Partition ErrorCode
> HighwaterMarkOffset MessageSetSize MessageSet]]
>
> e.g. ThrottleTime comes first after the response header, not last.
>
> As a client library developer (https://github.com/oleksiyk/kafka) I would
> like to know if its an error in documentation or in Kafka server?
>
> Thanks!
>
> --
> Oleksiy Krivoshey
>



-- 
Grant Henke
Software Engineer | Cloudera
gr...@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke

Reply via email to