I am using python and confluent_kafka
I am building a Queue Management for Kafka where we can view the pending(uncommitted) messages of each topic, delete topic and purge topic. I am facing the following problems.
- I am using same group ID for all the consumers so that I can get the uncommitted messages.
- I have 2 consumers one (say consumer1) consuming and committing and another one (say consumer2) just consuming without committing.
If I run consumer1 and consumer2 simultaneously only one consumer will start consuming and another just keep on waiting and hence cause heavy loading time in the frontend.
If I assign different group Id for each it works but, the messages committed by consumer1 are still readable by consumer2.
Example: If I have pushed 100 messages and say consumer1 consumed 80 messages and when I try to consume from consumer2 it should consume only remaining 20, but it is consuming all 100 including the messages committed by consumer1.
How can I avoid that or solve?