How can I get the earliest or latest data?

For SDK versions 0.4.x and higher: 

Setting the auto.offset.reset property in to latest, will start the consumer from where it last stopped consuming or failed (not with latest message). 

Setting the auto.offset.reset property in to earliest, will always start the consumer reading data after midnight (12:00:00 AM ET) 

The default value for auto.offset.reset is earliest. 

For SDK versions 0.3.x and lower: 

This is done by setting the consumer's `auto.offset.reset` property when connecting. See the complete documentation:

You can either connect to the topic from `earliest` (default) or `latest` when you pass in the `auto.offset.reset` property in


- or - 


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.