예제 #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));
        }