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

Reading only the latest message

2014-12-09 Thread Orelowitz, David
@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, Dec 8, 2014 at 8:32 AM, Orelowitz, David mailto:david.orelow...@baml.com>

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. >

Reading only the latest message

2014-12-05 Thread Orelowitz, David
What is the best mechanism to retrieve the latest message from a kafka partition. We intend for our producer, on startup or recovery, to read the upstream sequence number in the last message in the partition and request for the upstream system to start sending from that sequence number++. Curr