public KafkaTopic(IZookeeperConnection zkConnect, string name) { _zkConnect = zkConnect; _name = name; _zkClient = zkConnect.CreateClient(); _producer = _zkClient.CreateProducer <string, KafkaMessage>(); }
public KafkaTopic(IZookeeperConnection zkConnect, string name, ProducerConfig producerConfig = null) { if (producerConfig == null) { producerConfig = ProducerConfig.GetDefaultConfig(); } _zkConnect = zkConnect; _name = name; _zkClient = zkConnect.CreateClient(); _producer = _zkClient.CreateProducer <string, KafkaMessage>(producerConfig); }