Thanks Luke for the KIP. I think I understand the motivation is to avoid affecting offset positions of the records, but the feature could be easily realized on the user side by using manual offset commit + offset position rewind. So the new peek() function doesn't provide any new functionality IMHO, weakening the motivation a bit.
Additionally, for the peek() case, I believe that users may want to have more fine-grained exposure of records, such as from specific partitions instead of getting random records. It's probably useful to define an option handle class in the parameters to help clarify what specific records to be returned. Boyang On Sun, Sep 19, 2021 at 1:51 AM Luke Chen <show...@gmail.com> wrote: > Hi everyone, > > I'd like to discuss the following proposal to add Consumer#peek for > debugging/tuning. > > The main purpose for Consumer#peek is to allow users: > > 1. peek what records existed at broker side and not increasing the > position offsets. > 2. throw exceptions when there is connection error existed between > consumer and broker (or other exceptions will be thrown by "poll") > > > detailed description can be found her: > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=188746244 > > > Any comments and feedback are welcomed. > > Thank you. > Luke >