Hi Sarang,

I have used
config.startOffsetTime to go back to a previous offset ( not necessary 
earliest),
ad as you mentioned it works only if config.forceFromStart = true;

I think naming is little wrong, read it as config.forceStartFromGivenOffset.

Regards,
Shivendra


From: Sarang Deshpande 
<[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Monday, March 30, 2015 at 2:35 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [Kafka Spout] - EarliestTime vs. forceFromStart

Hello storm users,
There are two variables in the Kafka spout config, startOffsetTime and 
forceFromStart. If I set these as follows -

config.forceFromStart = false;
config.startOffsetTime = OffsetRequest.EarliestTime();

Kafka spout reads only the newly published messages (from latest offset) and 
DOES NOT read from start as one would expect. Only when config is set as 
follows, Kafka spout reads from the beginning.

config.forceFromStart = true;
config.startOffsetTime = OffsetRequest.EarliestTime();

Can someone explain what is the logical difference between forceFromStart and 
startOffsetTime being EarliestTime?

Thanks much
~Sarang

PS: Note that on the other hand, if forceFromStart is true and startOffsetTime 
is LatestTime(), that is if they contradict with each other, then spout reads 
only newly published messages.

Reply via email to