I am implementating basic functionalities of kafka. I have created some java classes for creating topics , a producer to send messages,a ConsumerGroup to consume those messages and at last,a class for deleting topic. My other functionalities are working normal but my class for deleting topic is not working as required. The problems are:
1. It is displaying 'deletion successful' for the topics not present.
2. If a topic is deleted and then another topic with same name is created, the messages from previous deleted topics are consumed.(This happens till I dont restart the server).
So, is it required that everytime I delete a topic, I have to restart my kafka server?.Or, there are some other solutions?