Kafka Stream instance -> stop coroutine only when NOT_RUNNING
This commit is contained in:
parent
f4744c7286
commit
275fb27a29
1 changed files with 5 additions and 2 deletions
|
|
@ -105,8 +105,11 @@ internal class KafkatorioTopology(
|
|||
streams.setStateListener { newState: KafkaStreams.State, _ ->
|
||||
when (newState) {
|
||||
KafkaStreams.State.NOT_RUNNING,
|
||||
KafkaStreams.State.ERROR -> cont.resume(newState)
|
||||
else -> Unit // do nothing
|
||||
// KafkaStreams.State.ERROR,
|
||||
-> if (cont.isActive) {
|
||||
cont.resume(newState)
|
||||
}
|
||||
else -> Unit // do nothing
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue