コード例 #1
0
ファイル: Connector.cs プロジェクト: szp11/Kafka4n
        public FetchResponse Fetch(string topic, int partition, int correlationId, string clientId, long offset, int maxBytes)
        {
            FetchRequest fetchRequest = new FetchRequest(correlationId, clientId);

            fetchRequest.AddTopic(topic, partition, offset, maxBytes);
            return(Fetch(fetchRequest));
        }
コード例 #2
0
ファイル: Connector.cs プロジェクト: szp11/Kafka4n
        public FetchResponse Fetch(string topic, int partition, int correlationId, string clientId, long offset, int maxBytes, bool fromStart)
        {
            if (fromStart)
            {
                offset = OffsetRequest.LatestTime;
            }
            FetchRequest fetchRequest = new FetchRequest(correlationId, clientId);

            fetchRequest.AddTopic(topic, partition, offset, maxBytes);
            return(Fetch(fetchRequest));
        }