You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "hsy541@gmail.com" <hs...@gmail.com> on 2014/05/29 02:24:06 UTC
How to get last message
Is there a way to get the last message of a partition for a given topic?
Re: How to get last message
Posted by Jun Rao <ju...@gmail.com>.
There is no direct way. You can try getting the last offset (the offset of
the next to be appended message) using the getOffsetBefore api and then
using that offset - 1 to fetch.
Thanks,
Jun
On Wed, May 28, 2014 at 5:24 PM, hsy541@gmail.com <hs...@gmail.com> wrote:
> Is there a way to get the last message of a partition for a given topic?
>