Graeme Rocher created KAFKA-8619:
------------------------------------
Summary: Allow instances to be passed instead of Classes or
Strings for configuration
Key: KAFKA-8619
URL: https://issues.apache.org/jira/browse/KAFKA-8619
Project: Kafka
Issue Type: Wish
Reporter: Graeme Rocher
Fix For: 2.3.0
The getConfiguredInstances method of AbstractConfig currently forces values to
be either a Class instantiated directly by Kafka or a String that uses dynamic
classloading.
This limits how DI systems can integrate with Kafka since if you want to inject
an existing Spring, Micronaut, Guice etc. bean to for example by your Metrics
reporter then there is no way to do that currently.
What would be useful is if a simple `if (t.isInstance(klazz)) o = klazz;`
statement could be added such that it is possible to specify instances that are
not instantiated by Kafka.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)