I'm using a KafkaConsumer java client to connect with Kafka brokers. My user can define a proxy (ip : port) between the KafkaConsumer and the brokers.
---------------------- ------------- -----------------------
| Application client | <---> | TCP Proxy | <---> | Target (e.g. kafka) |
---------------------- ------------- -----------------------
Without the proxy, configuration 'boostrap.servers' with the broker's list is enough to establish an initial connection.
My question is, how can I manage the KafkaConsumer to initial the connection with the brokers via the proxy? does apache-Kafka have that kind of support?
I tried to find a property such as 'listeners
' and 'advertised.listeners
', however, they are a broker configuration and I can't configure the brokers.