You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by anand jain <an...@gmail.com> on 2014/08/01 12:32:55 UTC

Delete message after consuming it

I want to delete the message from a Kafka broker after consuming it(Java
consumer). How can I do that?

Re: Delete message after consuming it

Posted by Kashyap Paidimarri <ka...@gmail.com>.
Kafka is a log and not a queue. The client is remembering a position in the
log rather than working with individual messages.


On Fri, Aug 1, 2014 at 4:02 PM, anand jain <an...@gmail.com> wrote:

> I want to delete the message from a Kafka broker after consuming it(Java
> consumer). How can I do that?
>



-- 
“ The difference between ramen and varelse is not in the creature judged,
but in the creature judging. When we declare an alien species to be ramen,
it does not mean that *they* have passed a threshold of moral maturity. It
means that *we* have.

    —Demosthenes, *Letter to the Framlings*
”

Re: Delete message after consuming it

Posted by Manikumar Reddy <ku...@nmsworks.co.in>.
Hi,

Kafka supports two types of log/messages retention policies.

Log retention(size/time): The messages will be discarded after
log.retention.minutes or  when the log size reaches log.retention.bytes

Log compaction: which ensures that Kafka will always retain at least the
last known value for each message key within the log of data for a single
topic partition.

https://kafka.apache.org/documentation.html#compaction


Kumar


On Fri, Aug 1, 2014 at 4:02 PM, anand jain <an...@gmail.com> wrote:

> I want to delete the message from a Kafka broker after consuming it(Java
> consumer). How can I do that?
>