Hi Chia-Ping,

Thanks for your answer. Apologies I should have been clearer in the
previous message. What I meant is, is there a plan to use the SPI more
broadly inside the Kafka codebase?

The question arises because the interface exposes a close() method
which is never invoked by the ConsoleProducer. Hence, although we need
to keep this method to maintain compatibility of the SPI with its
current implementations, we should perhaps clarify that this method is
not used/deprecated, unless it is intended to be used in the future.

Thanks,
Alexandre

Le mer. 22 févr. 2023 à 09:27, Chia-Ping Tsai <chia7...@apache.org> a écrit :
>
> > A minor comment. The SPI is currently used exclusively for the
> > ConsoleProducer. However, it exposes high-level methods which hint at
> > it being a generic component. What is the actual scope of the SPI
> > inside the Kafka codebase? Is it planned to be re-used in other tools?
> > Or is this interface used (not implemented) outside of the
> > ConsoleProducer?
>
> It is used by ConsoleProducer only. The interface is a kind of public APIs, 
> and IIRC the public APIs must be written by Java. That is why we need to move 
> it out of core module (simplify core module also).
>
> There are many other interfaces which allow users to "enhance" kafka. For 
> example, partitioner, assignor, authorizer, and so on. Most of them are used 
> exclusively for specify component, and I guess not all interfaces are widely 
> used (implemented). Maybe we can file a thread to cleanup the "unused" 
> interfaces.

Reply via email to