When I worked on KIP-383 I was told the way to pass extra arguments to an 
instance is to add extra arguments to configure. I would now suggest we do like 
the KeySerializer. If you look in KafkaProducer, it creates a KeySerializer 
using AbstractConfig. getConfiguredInstance(). Since KeySerializer does not 
extend KeySerializer, AbstractConfig does not call configure(Map). 
KafkaProducer then calls configure() with two arguments. This removes the need 
for the init() method which would be called too late after configure(). By the 
way, the KeySerializer is not the only interface that does this.

In summary, SslEngineFactory does not extend Configurable and it has a 
configure() method with more than 1 argument.

The next item is to spec how config.originals() is passed to SslChannelBuilder: 
the KIP needs to explain we will push the choice of configs within the switch 
in ChannelBuilders.create()

Finally, we need to spec which configs are passed to shouldRebuiltFor(). I 
assume these are now originals() instead of values(). We also need to specify 
if all configs are passed or just the reconfigurable ones.

Reply via email to