Hi,

This approach should work. I think `name` is a bit too generic. Perhaps
`listener` would be a better option for the non deprecated method name.

Ismael

On Mon, Mar 17, 2025 at 5:42 AM Chia-Ping Tsai <chia7...@apache.org> wrote:

> Maybe we can add new method `name()` same to `RaftVoterEndpoint#name`.
>
> in 4.x:
>
> 1) add `org.apache.kafka.common.Endpoint#name()`
> 2) deprecate `org.apache.kafka.common.Endpoint#listenerName()`
> 3) replace `org.apache.kafka.common.Endpoint` by
> `org.apache.kafka.network.Endpoint`
>
> in 5.x
>
> 1) remove `org.apache.kafka.common.Endpoint#listenerName()`
>
> Best,
> Chia-Ping
>
> On 2025/03/17 07:58:47 Ismael Juma wrote:
> > To be clear, that's not the only issue. There is no way to make a
> > compatible change in signature like the one proposed by 5.0. Two major
> > releases would be required. And we also need a non deprecated method to
> be
> > used in the meantime.
> >
> > Ismael
> >
> > On Mon, Mar 17, 2025, 12:41 AM Chia-Ping Tsai <chia7...@gmail.com>
> wrote:
> >
> > > hi PoAn,
> > >
> > > chia_q0:
> > > To prevent potential misinterpretations, could you please explicitly
> list
> > > the features that will be deprecated and added in Kafka 4.x, and those
> that
> > > will be removed in Kafka 5.x? Without this clarification, readers might
> > > mistakenly assume that breaking changes are planned for Kafka 4.x.
> > >
> > > chia_q1:
> > > Furthermore, regarding the Endpoint.listenerName() method, our previous
> > > discussion [0] indicated that it returns an Optional value because it
> was
> > > intended for use by other public APIs. However, it appears that we
> have not
> > > fully utilized this approach. For instance, RaftVoterEndpoint [1] was
> > > created as a separate class to represent the endpoint for voters,
> rather
> > > than reusing the Endpoint class. I believe this discrepancy should be
> > > included in the KIP as a key motivation for the proposed changes.
> > >
> > > [0] https://lists.apache.org/thread/v6s7wnmzbprs26dyd7gom0g55k0ww1o2
> > > [1]
> > >
> > >
> https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/admin/RaftVoterEndpoint.java
> > >
> > > Best,
> > > Chia-Ping
> > >
> > >
> > >
> > > Ismael Juma <m...@ismaeljuma.com> 於 2025年3月17日 週一 上午4:48寫道:
> > >
> > > > Hi,
> > > >
> > > > We cannot make incompatible changes to public classes outside of
> major
> > > > releases. The evolving annotation was left by mistake given that
> these
> > > > classes have been there for a long time by now.
> > > >
> > > > The general way to handle this is to have a new non deprecated
> method,
> > > > deprecate the old one. And then remove the deprecated one in 5.0.
> > > >
> > > > Ismael
> > > >
> > > > On Sun, Mar 16, 2025, 5:53 AM PoAn Yang <yangp...@gmail.com> wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > I would like to start a discussion thread on KIP-1143.
> > > > >
> > > > > This KIP removes redundant org.apache.kafka.network.EndPoint and
> > > replaces
> > > > > it with org.apache.kafka.common.Endpoint. Also, it changes output
> of
> > > > > Endpoint#listenerName from Optional<String> to String.
> > > > >
> > > > > Please take a look and feel free to share any thoughts.
> > > > >
> > > > >
> > > >
> > >
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=345377327
> > > > >
> > > > > Sample PR: https://github.com/apache/kafka/pull/19191
> > > > >
> > > > > Thanks,
> > > > > PoAn
> > > >
> > >
> >
>

Reply via email to