Based on Kafka documentation https://kafka.apache.org/documentation/#compaction
The order of client consumption based on offset:
before compaction is K1,K2,K3,K4,K5,K6 and
after compaction it becomes K1,K3,K4,K5,K2,K6
So am I right saying that (if we have relatively small compaction interval) if we have K2 keep coming into the topic (along with other keys, say non repeated, K100,K101,K102 etc), it would be pushed back all the time, and if we have a consumer slower than producer, the consumer will not get to consume K2 until it catches up with the speed of the producer?
If the above statement is true, do we have a way of configuring this behaviour, such as the order of consumption remain the same as before compaction, but value of K2 gets the latest.
Asked
Active
Viewed 55 times
1

user2001850
- 477
- 4
- 18