startOffsetTime has to do with when you don't already have saved offsets,
or your offsets are invalid for some reason (e.g. your consumer was down
long enough that Kafka has deleted the relevant offsets from disk). The
first time your consumer starts it'll use startOffsetTime as advisement
(start at beginning of topic, or end?).

forceFromStart ignores your saved offsets. I'm unclear if it actually
forces from start, or if it'd reset to the end of the topic if your
startOffsetTime
was set to latest.

*Michael Rose*
Senior Software Engineer, Data Science
*Full*Contact | fullcontact.com
<https://www.fullcontact.com/?utm_source=FullContact%20-%20Email%20Signatures&utm_medium=email&utm_content=Signature%20Link&utm_campaign=FullContact%20-%20Email%20Signatures>
m: +1.720.837.1357 | t: @xorlev


All Your Contacts, Updated and In One Place.
Try FullContact for Free
<https://www.fullcontact.com/?utm_source=FullContact%20-%20Email%20Signatures&utm_medium=email&utm_content=Signature%20Link&utm_campaign=FullContact%20-%20Email%20Signatures>

On Mon, Mar 30, 2015 at 3:35 PM, Sarang Deshpande <
[email protected]> wrote:

> 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