Skip to content

Commit

Permalink
v2.0.0 Consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaahmedkhan committed Jul 25, 2022
1 parent 371507f commit 14f7486
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion sealed-class-service-1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'org.jetbrains.kotlin.jvm'
}

version = "1.0.0"
version = "2.0.0"

java {
sourceCompatibility = JavaVersion.VERSION_1_7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ import kotlinx.coroutines.*
import kotlinx.coroutines.flow.collectLatest


suspend fun main() {
val producer: ProfileProducer = ProfileProducer()

// KAFKA dummy copy
GlobalScope.launch {
producer.state.collectLatest{ profileType ->
checkAllTypes(profileType)
}

}
producer.sendMeStates()


}

fun checkAllTypes(profileType: ProfileType) {
//suspend fun main() {
// val producer: ProfileProducer = ProfileProducer()
//
// // KAFKA dummy copy
// GlobalScope.launch {
// producer.state.collectLatest{ profileType ->
// checkAllTypes(profileType)
// }
//
// }
// producer.sendMeStates()
//
//
//}

fun profileConsumer(profileType: ProfileType) {
println(profileType)

when (profileType) {
Expand Down

0 comments on commit 14f7486

Please sign in to comment.