/// <summary>
 /// Initializes a new instance of the <see cref="ZooKeeperAwareKafkaClientBase"/> class.
 /// </summary>
 /// <param name="config">The config.</param>
 protected ZooKeeperAwareKafkaClientBase(ZKConfig config)
 {
     this.IsZooKeeperEnabled = config != null && !string.IsNullOrEmpty(config.ZkConnect);
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ZKBrokerPartitionInfo"/> class.
 /// </summary>
 /// <param name="config">The config.</param>
 /// <param name="callback">The callback invoked when new broker is added.</param>
 public ZKBrokerPartitionInfo(ZKConfig config, Action<int, string, int> callback)
     : this(new ZooKeeperClient(config.ZkConnect, config.ZkSessionTimeoutMs, ZooKeeperStringSerializer.Serializer))
 {
     this.callback = callback;
 }
Пример #3
0
 public void SetUp()
 {
     clientConfig = KafkaClientConfiguration.GetConfiguration();
     zkConfig = new ProducerConfig(clientConfig);
 }