milindparikh/erlkafka — pull request #2 by dcuddeback (2013-03-01 03:00:19+00:00)
Title: Fixes call to internal function in kafka_server_sup:start_link()

This patch fixes a bug that prevented starting the `erlkafka_app` application when using ZooKeeper for dynamic broker discovery. In the `kafka_server_sup:start_link()` function, it was calling `kafka_protocol:get_dynamic_list_of_brokers()`, which according to the comments in `kafka_protocol.erl` is an internal function and is not exported. As a result, the application crashes as soon as it tries to start.

Since the whole function re-implements the functionality of `kafka_protocol:get_list_of_brokers()`, I replaced the entire function implementation with a call to that function instead.