Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backpressure and coroutines #385

Open
elfogre opened this issue Apr 11, 2023 · 1 comment
Open

Backpressure and coroutines #385

elfogre opened this issue Apr 11, 2023 · 1 comment

Comments

@elfogre
Copy link

elfogre commented Apr 11, 2023

Hi!

I found some references about backpressure and rxjava on other implementations: https://github.com/salesforce/reactive-grpc#back-pressure

I was reading all your doc but I can not found if grpc-kotlin lib has a backpressure implementation that could block the suspendable flow.emit() function.

Also if that is working, how could I configure buffer sizes?

Thanks in advance!

@lowasser
Copy link
Collaborator

gRPC for Kotlin exerts backpressure the same way flows in general in Kotlin do: they request elements at the rate the consumer finishes with them. You can add a buffer by just calling the normal Flow.buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants