Hi, dev community,

We are currently working with Kafka 3.7.0 and have configured a topic with
the following settings:

log.cleanup.policy=compact
segment.ms=120000 (2 minutes)
log.roll.hours (default 7 days)

This topic is used for testing purposes and has a low message volume.
Specifically, it contains a single partition with two messages having the
same key, separated by 5 minutes. After these messages, no new messages
have been added for the past 10 days.

*Expected behavior*: Both messages should be compacted into one, given the
log.cleanup.policy=compact.

*Actual behavior*: Both messages remain on the topic, and no compaction
seems to have occurred.

I have investigated the code and observed a scheduled job for the delete
policy that checks every 5 minutes and closes active segments if retention
criteria are met. However, I did not find a similar scheduler for compact
topics.

Could you please clarify if this behavior is expected under the current
configuration? If it is not, might this be a potential bug? Additionally,
am I possibly overlooking any configurations or mechanisms related to
compaction that could explain this behavior?

Thank you for your assistance.

Regards,
Rich

Reply via email to