How to define offset.retention.minutes different for different consumer groups?

Viewed 142

I understand if we define offset.retention.minutes in the broker server.property file then all consumer's offsets stored in _consumer.offset topic will be expired after the configured period in server.property file. But can I define offset.retention.minutes in consumer group property?

Say:

Topic 1 can be consumed by ConsumerGroup1.

Topic 2 can be consumed by ConsumerGroup2.

I want to persist ConsumerGroup1 committed offset 10 days and ConsumerGroup1 committed offset 20 days. Is it possible?

1 Answers

Similar question - can messages have their own retention

No, the retention is defined for the topic, not groups (messages) in the topic.

If you don't want a group to be removed, make sure there's an active consumer always reading from its topics

Related