Assume a topic has 2 partitions. We have 2 consumers in a same group both consume from that topic: Consumer A consumes partition 0, Consumer B consumes partition 1. Consumer A is the group leader of the consumer group.
At a moment, Consumer B got a batch of messages from the topic, for example message: X, Y. Right after that, Consumer B stopped.
After a while, Consumer A thinks that Consumer B is dead, and decides to rebalance and consume from partition 1. It gets messages: X, Y, Z (in order) and then writes to a database.
After that, Consumer B resumes the execution, had no idea that some time has passed, and continue to write message X, Y, overwriting the effect of Z. And then Consumer B fails completely.
Is it possible? If yes, the simple way of consuming messages and upserting to a database might not be safe.