Hey all,

We are working on a .net client, and I have a question about the OffsetRequest 
api 
(https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-OffsetAPI)

It seems to indicate that you would always get the "log end offset" (tail 
offset) regardless of the input request:

                "The response contains the starting offset of each segment for 
the requested partition as well as the "log end offset" i.e. the offset of the 
next message that would be appended to the given partition."

However from inspecting the code, and experimenting with the API, that doesn't 
seem to be the case. We cannot seem to fetch both the head (earliest offset, 
based on Time specified as -2L ) and Tail which we would have expected based on 
the comment above in the protocol docs.

We can get either the earliest OR latest, but not both. We attempted to pass 
two entries (the Array of [Partition,Time,MaxNumberOfOffsets] per the protocol) 
for the same partition ID, one with a -1L and one with a -2L, however we get 
only one result back, and from the code in KafkaApis.scala handleOffsetRequest, 
it seems like there could never be multiple requests for the same 
topic/partition.

Does anyone know if this should be possible, or if there is a work-around for 
this? Also, should something like this go to the dev group instead?

Thanks
Thunder

Reply via email to