vertx-lang-kotlin
vertx-lang-kotlin copied to clipboard
Flow support
It would be nice to have have support for Kotlin's Flow wherever fitting, e.g. for streaming results from postgres. It has been promoted to sable recently: https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.3.0 and we are already making use of it in our applications, so it would be great if we could integrate vertx easily into that.
@Globegitter what would it look like? Like flow emit the eventbus messages?
On my side, I would like bridge/operator to convert a ReadStream<Buffer> to a Flow<Buffer> and conversion from Flow<Buffer> to WriteStream<Buffer>.
@Globegitter you can convert a ReadStream to a channel and then use consumeAsFlow