Keep the Latest

A pricing service rebuilds an in-memory map of the current price per SKU by reading a topic from the beginning at startup. Some SKUs have not changed in two years but their prices are still valid, and the topic cannot grow without bound. What topic configuration supports this?

A

Raise the partition count so each partition's segments stay under the retention size limit

B

Set cleanup.policy=compact so the log keeps at least the newest record for every key indefinitely

C

Set retention.ms to a very large value so no segment is ever eligible for deletion

D

Keep a short retention and have the service fall back to the database for keys it did not see