Closed Chrisss93 closed 4 years ago
Hi @Chrisss93 , thank you for your contribution! I like the idea to have a possibility to configure dynamic listener advertise address.
I would rather take the value of default-listener-ip instead of 127.0.0.1 as default for dynamic-advertised-listener. This would keep current behavior. Additionally ListenDynamicInstance function must return advertised listener.
Please have a look at my changes ;-) https://github.com/grepplabs/kafka-proxy/commit/b6f326d673e18f9f03e840c8a20d16cdd5d95500
If Kafka-proxy is not run as a local side-car but on a remote server to proxy a remote Kafka Cluster, the dynamic listeners for the discovered brokers from the metadata are not resolvable. We can side-step this issue by configuring a bootstrap-server-mapping for every kafka broker in the cluster we are proxying, but that feels a bit too manual and requires foreknowledge of how many brokers are in the cluster. Instead it seems simple enough to add another flag that sets the advertised address for any dynamic listeners.
Consider:
vs.
Let me know if this would be useful, or if I'm missing something on how kafka-proxy is intended to be used.