I think hosts should already be a list of "host:port" strings. The caller should handle creating it from a config or command line or whatever, and KafkaClient shouldn't have to worry about parsing and splitting comma-separated strings (which may or may not have spaces in them). Also, as it is here, if the caller already gets the hosts as a list, it would have to convert it to a single string to use it.