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, hsy...@gmail.com <hsy...@gmail.com> wrote: > Is there a way to get the last message of a partition for a given topic? >