hachikuji commented on pull request #10275:
URL: https://github.com/apache/kafka/pull/10275#issuecomment-801315101


   @dajac Thanks for reviewing. I think you have to compare the complexity with 
(for example) the `listOffsets` implementation which relies on `Call` chaining 
and the internal `MetadataOperationContext`. And that implementation doesn't 
even handle re-coalescing of requests, though that is admittedly more of a 
fringe benefit. The main advantage to me is that it provides better 
encapsulation of the lookup logic and simpler testing. This allows us to reuse 
`PartitionLeaderStrategy` in different APIs (including `listOffsets`) without 
having to duplicate a bunch of logic. Meanwhile, the API handler itself, such 
as `DescribeProducersHandler`, only has to focus on the logic of the 
`DescribeProducers` API.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to