Skip to content
Snippets Groups Projects
Commit bf9cd122 authored by Lorenz Boguhn's avatar Lorenz Boguhn
Browse files

Add forgotten deletion

parent d6e116ec
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!128Hotfix TopicManager again,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
......@@ -30,7 +30,9 @@ class TopicManager(private val kafkaConfig: HashMap<String, Any>) {
result.all().get()// wait for the future object
} catch (e: Exception) {
removeTopics(newTopics.map { topic -> topic.name() })
logger.warn { "Error during topic creation." }
logger.debug { e }
logger.warn { "Will retry the topic creation after 2 seconds" }
sleep(RETRY_TIME)
retryCreation = true
......@@ -53,7 +55,7 @@ class TopicManager(private val kafkaConfig: HashMap<String, Any>) {
fun removeTopics(topics: List<String>) {
val kafkaAdmin: AdminClient = AdminClient.create(this.kafkaConfig)
var deleted = false
while (!deleted) {
try {
val result = kafkaAdmin.deleteTopics(topics)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment