/// <summary> /// Initializes a new instance of the <see cref="PartitionTopicInfo"/> class. /// </summary> /// <param name="topic"> /// The topic. /// </param> /// <param name="partitionId"> /// The broker's partition. /// </param> /// <param name="chunkQueue"> /// The chunk queue. /// </param> /// <param name="consumedOffset"> /// The consumed offset value. /// </param> /// <param name="fetchedOffset"> /// The fetched offset value. /// </param> /// <param name="fetchSize"> /// The fetch size. /// </param> /// <param name="clientId">Client id</param> public PartitionTopicInfo( string topic, int partitionId, BlockingCollection <FetchedDataChunk> chunkQueue, AtomicLong consumedOffset, AtomicLong fetchedOffset, AtomicInteger fetchSize, string clientId) { this.Topic = topic; this.PartitionId = partitionId; this.chunkQueue = chunkQueue; this.consumedOffset = consumedOffset; this.fetchedOffset = fetchedOffset; this.fetchSize = fetchSize; this.clientId = clientId; this.consumerTopicStats = ConsumerTopicStatsRegistry.GetConsumerTopicStat(clientId); if (Logger.IsDebugEnabled) { Logger.DebugFormat( CultureInfo.CurrentCulture, "initial consumer offset of {0} is {1}", this, consumedOffset); Logger.DebugFormat( CultureInfo.CurrentCulture, "initial fetch offset of {0} is {1}", this, fetchedOffset); } }
public ConsumerIterator(BlockingCollection <FetchedDataChunk> channel, int consumerTimeoutMs, IDecoder <TKey> keyDecoder, IDecoder <TValue> valueDecoder, string clientId) { this.channel = channel; this.consumerTimeoutMs = consumerTimeoutMs; this.keyDecoder = keyDecoder; this.valueDecoder = valueDecoder; this.ClientId = clientId; this.consumerTopicStats = ConsumerTopicStatsRegistry.GetConsumerTopicStat(clientId); }