Implementation of the custom configuration section for the kafka client
Наследование: System.Configuration.ConfigurationSection
Пример #1
0
        public SyncProducerConfig(KafkaClientConfiguration kafkaClientConfiguration) : this()
        {
            Guard.Assert <ArgumentNullException>(() => kafkaClientConfiguration != null);

            this.Host = kafkaClientConfiguration.KafkaServer.Address;
            this.Port = kafkaClientConfiguration.KafkaServer.Port;
        }
Пример #2
0
        public SyncProducerConfig(KafkaClientConfiguration kafkaClientConfiguration)
            : this()
        {
            Guard.Assert<ArgumentNullException>(() => kafkaClientConfiguration != null);

            this.Host = kafkaClientConfiguration.KafkaServer.Address;
            this.Port = kafkaClientConfiguration.KafkaServer.Port;
        }
Пример #3
0
        public ProducerConfig(KafkaClientConfiguration kafkaClientConfiguration)
            : this()
        {
            Guard.Assert<ArgumentNullException>(() => kafkaClientConfiguration != null);
            if (kafkaClientConfiguration.IsZooKeeperEnabled)
            {
                this.ZkConnect = kafkaClientConfiguration.ZooKeeperServers.AddressList;
                this.ZkSessionTimeoutMs = kafkaClientConfiguration.ZooKeeperServers.SessionTimeout;
                this.ZkConnectionTimeoutMs = kafkaClientConfiguration.ZooKeeperServers.ConnectionTimeout;
            }

            this.BrokerPartitionInfo = kafkaClientConfiguration.GetBrokerPartitionInfosAsString();
        }
Пример #4
0
        public ProducerConfig(KafkaClientConfiguration kafkaClientConfiguration)
            : this()
        {
            Guard.Assert <ArgumentNullException>(() => kafkaClientConfiguration != null);
            if (kafkaClientConfiguration.IsZooKeeperEnabled)
            {
                this.ZkConnect             = kafkaClientConfiguration.ZooKeeperServers.AddressList;
                this.ZkSessionTimeoutMs    = kafkaClientConfiguration.ZooKeeperServers.SessionTimeout;
                this.ZkConnectionTimeoutMs = kafkaClientConfiguration.ZooKeeperServers.ConnectionTimeout;
            }

            this.BrokerPartitionInfo = kafkaClientConfiguration.GetBrokerPartitionInfosAsString();
        }
Пример #5
0
 public void SetUp()
 {
     clientConfig = KafkaClientConfiguration.GetConfiguration();
     clientConfig.SupressZooKeeper();
 }
Пример #6
0
 public void SetUp()
 {
     clientConfig = KafkaClientConfiguration.GetConfiguration();
 }
Пример #7
0
 public static long GetCurrentKafkaOffset(string topic, KafkaClientConfiguration clientConfig)
 {
     return GetCurrentKafkaOffset(topic, clientConfig.KafkaServer.Address, clientConfig.KafkaServer.Port);
 }
Пример #8
0
 public void SetUp()
 {
     clientConfig = KafkaClientConfiguration.GetConfiguration();
     zkConfig = new ProducerConfig(clientConfig);
 }