https://kotlinlang.org logo
#ktor
Title
# ktor
l

Levi

12/04/2023, 3:09 PM
I'm trying to figure out the right way to start my ktor server using
io.ktor.server.netty.EngineMain.main(args)
while also launching a coroutine that subscribes to a Kafka topic and continuously reads messages. I had thought the right way to do this would be something along the lines of
Copy code
launch {
   subscribeToKafkaTopic()
}

....
launch {
   io.ktor.server.netty.EngineMain.main(args)
}
However, when I do that, I get the following compile error: `Main class was not found, perhaps you should add a
mainClass
configuration to jib` Any suggestions for how accomplish this?