We only delete topics which does not have any active producers. Nowhere in our consumer config we explicitly specify topic name, these are subscribed based on pattern. How do I remove topic from consumer config?
On Sun, 18 Feb 2024 at 2:51 PM, sunil chaudhari <sunilmchaudhar...@gmail.com> wrote: > correcte missig thing. > You have to remove that topic from producer as well as consumer config > both. > > On Sun, 18 Feb 2024 at 2:49 PM, sunil chaudhari < > sunilmchaudhar...@gmail.com> > wrote: > > > You have to remove that topic from consumer config. > > restart consumer. > > the wait for some time. > > Then delete topic. > > this time it wont create again. > > > > On Sun, 18 Feb 2024 at 1:07 PM, Abhishek Singla < > > abhisheksingla...@gmail.com> wrote: > > > >> Hi Team, > >> > >> Kafka version: 2_2.12-2.6.0 > >> Zookeeper version: 3.4.14 > >> Java version: 1.8.0_301 > >> > >> Kafka Subscribe Pattern API is used to Subscribe to all topics matching > >> specified pattern to get dynamically assigned partitions. New topics of > >> specified pattern get created with time. > >> > >> > KafkaConsumer<K, V> subscribe(Pattern pattern, > >> Handler<AsyncResult<Void>> > >> completionHandler); > >> > >> The issue arises when we try to delete the topic. After the delete topic > >> command is issued, the topic is deleted successfully. However, it gets > >> auto-created again within 5 mins. Broker offsets are reset to zero, new > >> topic partitions could be on same broker nodes or different. > >> > >> Below are some of the configs used: > >> > >> > >> *Server Configs:* > >> delete.topic.enable=true > >> auto.create.topics.enable: true > >> > >> *Consumer Configs* > >> allow.auto.create.topics=false > >> > >> Could someone help us out in understanding what might be the root cause > of > >> this issue? > >> > >> Regards, > >> Abhishek Singla > >> > > >