Kafka offers two cleanup policies, which seems simple enough: "delete", where data is deleted after a certain amount of time, and "compact", where only the most recent value is kept for any key.
inoio gmbh | Eventual Consistency via Kafka Transactional Outbox
Our systems today are typically distributed, and sometimes integrated via an event bus such as Kafka.We store data in a database and publish events to inform other systems of changes.