vertx-lang-kotlin icon indicating copy to clipboard operation
vertx-lang-kotlin copied to clipboard

Flow support

Open Globegitter opened this issue 6 years ago • 2 comments

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 avatar Sep 09 '19 07:09 Globegitter

@Globegitter what would it look like? Like flow emit the eventbus messages?

asad-awadia avatar May 21 '20 03:05 asad-awadia

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>.

ylemoigne avatar Jul 03 '20 11:07 ylemoigne

@Globegitter you can convert a ReadStream to a channel and then use consumeAsFlow

tsegismont avatar Oct 06 '23 15:10 tsegismont