Nevermind, it seems the way i send tombstone has issues.

I followed this link for sending tombstones but it seems it has some issue

kcat/README.md at master · edenhill/kcat · 
GitHub<https://github.com/edenhill/kcat/blob/master/README.md>


$ echo "abc:" | kcat -b mybroker -t mytopic -Z -K: (This one takes " as message)

$ echo abc: | kcat -b mybroker -t mytopic -Z -K: (This one takes one empty 
space as input)

The right way to send tombstone is

$ echo abc:| kcat -b mybroker -t mytopic -Z -K:

Regards,
Nanda

________________________________
From: Nanda Naga
Sent: Wednesday, February 15, 2023 9:31 PM
To: users@kafka.apache.org <users@kafka.apache.org>
Subject: Question regarding Kafka compaction and tombstone

Hi,

I am using Kafka 3.2 (in windows) and for a topic i to send tombstone records. 
Everything was ok but i always see last value for the key (even i see null 
records present after delete.retention.ms period)

Example
Key1  value1
Key2  value2
Key1 - null record - tombstone record
and so on

I am expecting to see only Key2 in the above the case but is see
Key2 value2
Key1 - null

It is not in active segments as i keep sending lot of other key value pairs and 
kept my segment.bytes to 1000 only

following is the configuration

Topic: NandaFinalTest   PartitionCount: 1       ReplicationFactor: 1    
Configs: 
cleanup.policy=compact,segment.bytes=1000,retention.ms=1000000,flush.messages=20000,message.format.version=2.3-IV1,max.compaction.lag.ms=20000,max.message.bytes=1000012,min.compaction.lag.ms=10000,message.timestamp.type=LogAppendTime,min.cleanable.dirty.ratio=0.01,index.interval.bytes=4096,delete.retention.ms=0,message.timestamp.difference.max.ms=604800000,segment.index.bytes=10485760

Attached my data log folder for my topic for reference.

Also, i see in all documentations/forums/discussions that the tombstone record 
should get deleted after delete.retention.ms time but I always end up seeing 
the last record with null

Am i missing something in the config and please help me in this regard. I need 
tombstone records to get deleted as well after delete.retention.ms time

Let me know if you need any more details to help here. Thanks


Regards,

Nanda


Reply via email to