Hi Okada Haruki:

Thanks for your comment.

I can use it partitionsFor(topic) for the goal, thus there are two reasons
why I don't choose it and propose to add new dedicated method:
1) Consider how to use the method to solve the issue, We should call it in
application's startup process before any record sent. Thus, The code will
look strange to call partitionsFor(topic) . So I suggest to add one common
method such as getCluster so that you can get and print some useful
information when startup with the goal reached. It also can provide more
information self compare with partitionsFor.
2) partitionsFor(topic) using the maxBlockTimeMs as the max blocking time.
For the metadata's fetching, I will take a lot of time so that we must
set maxBlockTimeMs
to a big value (at least > time for metadata). Thus consider that the send
method is async. Most of application like to reduce the maxBlockTimeMs. It
is conflict time requirement. So we need one new blocking time as parameter
of the method. I don't want to change the existing interface.
So based on above reasons. I suggest to add new method with time control
parameter.
WDTY?

Thanks.


Haruki Okada <ocadar...@gmail.com> 于2023年3月9日周四 10:19写道:

> You can just use Producer#partitionsFor
>
> 2023年3月9日(木) 11:13 jian fu <fujian1...@gmail.com>:
>
> > Hi All:
> >
> > If anyone can help to give some comments or suggestions for the proposal.
> > Thanks in advance!
> >
> > Regards
> > Jian
> >
> > jian fu <fujian1...@gmail.com> 于2023年3月6日周一 17:00写道:
> >
> > > Hi Everyone:
> > > Nice to meet you.
> > >
> > > I created one KIP to request your review.
> > > KIP-913: add new method to provide possibility for accelerate first
> > > record's sending
> > > <
> >
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-913%3A+add+new+method+to+provide+possibility+for+accelerate+first+record%27s+sending
> > >
> > > The example PR:
> > > *https://github.com/apache/kafka/pull/13320/files
> > > <https://github.com/apache/kafka/pull/13320/files>*
> > >
> > > Thanks.
> > >
> > > Regards
> > > Jian
> > >
> > >
> >
> > --
> > Regards  Fu.Jian
> > ------------------------------
> > Cisco Communications, Inc.
> >
>
>
> --
> ========================
> Okada Haruki
> ocadar...@gmail.com
> ========================
>


-- 
Regards  Fu.Jian
------------------------------
Cisco Communications, Inc.

Reply via email to