Re: Reading only the latest message

2014-12-09 Thread Neha Narkhede
his case… > > > > > > > > > > > > > > > > *From:* Neha Narkhede [mailto:n...@confluent.io] > *Sent:* Monday, December 08, 2014 12:43 PM > *To:* Orelowitz, David > *Cc:* users@kafka.apache.org > > *Subject:* Re: Reading only the latest mess

RE: Reading only the latest message

2014-12-08 Thread Orelowitz, David
] Sent: Monday, December 08, 2014 12:43 PM To: Orelowitz, David Cc: users@kafka.apache.org Subject: Re: Reading only the latest message The returned latest offset - 1 will be the offset of the last message. Sorry, should've made it clear in my last email. Let me know if that helps. On Mon,

Re: Reading only the latest message

2014-12-08 Thread Neha Narkhede
Message- > From: Neha Narkhede [mailto:n...@confluent.io] > Sent: Friday, December 05, 2014 8:33 PM > To: users@kafka.apache.org > Subject: Re: Reading only the latest message > > You can use the getOffsetsBefore() API and specify -1L to get the offset > of the last committed m

RE: Reading only the latest message

2014-12-08 Thread Orelowitz, David
resubscribe to the data source. -Original Message- From: Neha Narkhede [mailto:n...@confluent.io] Sent: Friday, December 05, 2014 8:33 PM To: users@kafka.apache.org Subject: Re: Reading only the latest message You can use the getOffsetsBefore() API and specify -1L to get the offset of the

Re: Reading only the latest message

2014-12-05 Thread Neha Narkhede
You can use the getOffsetsBefore() API and specify -1L to get the offset of the last committed message (at the time of the request) for that partition. On Fri, Dec 5, 2014 at 12:42 PM, Orelowitz, David wrote: > What is the best mechanism to retrieve the latest message from a kafka > partition. >