tl;dr: Is there ordered queue with file-based stor...
# getting-started
a
tl;dr: Is there ordered queue with file-based storage for coroutines? I've got a Ktor socket server that captures log messages from a TCP port, and forwards them to a Kafka topic. However the connection to Kafka is unstable, so I need to store the logs locally, and then forward them to Kafka once the connection is up. I think the best solution is a local file-based ordered store that I can put messages into with a
MutableSharedFlow<String>
, and then another
SharedFlow<String>
that in another coroutine awaits new messages from the file-store and forwards them to the Kafka topic (I'm using Kotlin/JVM 1.7, Ktor 2.0, Kakfa 3.2)