protected AbstractKafkaClient(KafkaSinkOptions options) { Contract.Requires<ArgumentNullException>(options != null); this.options = options; this.producerConfiguration = new ProducerConfiguration(options.Topic); }
public Producer(Cluster cluster, ProducerConfiguration producerConfiguration) { Configuration = producerConfiguration; _cluster = cluster; _cluster.OnThreadHang += e => { if (OnPermError != null) OnPermError(e, _allPartitionQueues.SelectMany(p => p.Value.Queue.ToArray()).ToArray()); }; }
public Producer(Cluster cluster, ProducerConfiguration producerConfiguration) { Configuration = producerConfiguration; _cluster = cluster; _queueSizeEvents = new Subject<QueueResizeInfo>(); QueueSizeEvents = _queueSizeEvents.ObserveOn(Scheduler.Default); _cluster.OnThreadHang += e => { if (OnPermError != null) OnPermError(e, _allPartitionQueues.SelectMany(p => p.Value.Queue.ToArray()).ToArray()); }; }
/// <summary> /// /// </summary> /// <param name="seedBrokers">Comma separated list of seed brokers. Port numbers are optional. /// <example>192.168.56.10,192.168.56.20:8081,broker3.local.net:8181</example> /// </param> /// <param name="producerConfiguration"></param> public Producer(string seedBrokers, ProducerConfiguration producerConfiguration) : this(new Cluster(seedBrokers), producerConfiguration) { _internalCluster = true; }