On any of Kafka cluster nodes runs following commands.
Topic
1 | # list topics created |
Consumer Group
1 | # list consumer groups |
Partition
1 | # increase partition number |
Delete Messages
If there is bad data in message that stucks the consumer, we can delete them from the specified partition:
1 | ./bin/kafka-delete-records.sh \ |
1 | { |
Note that if all messages need deleting from the topic, then specify in the JSON an offset of
-1
.