Hi guys, I've read that kafka consumers are not th...
# server
m
Hi guys, I've read that kafka consumers are not thread-safe. does this mean that I can't(or shouldn't) run consumers in asynchronous servers? sry if this is a dumb question. yep it was 😅 i guess multithreading is not allowed while async is different
c
Asynchronous != Multi-threaded. Asynchronous means “you can request something, do something else, and then get notified later when the result is ready” Because you can do something else while waiting for the results, it looks like you're doing multiple things at once, but that's not always really the case. Multi-threaded really means doing multiple things at once. It's possible to be asynchronous with or without being multi-threaded. For example: • Kotlin/JS is always single-threaded. • KotlinX.Coroutines' MainScope is single-threaded and asynchronous. • KotlinX.Coroutines' Dispatchers.IO is multi-threaded and asynchronous. • if you're using another library, you'll need to find in the docs which combination they use
💯 5