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
Allow to override prefetch on client and server side #204
Conversation
… cause OOM when messages are big.
Thanks for the contribution! Before we can merge this, we need @koldat to sign the Salesforce.com Contributor License Agreement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great contribution! Just a few small changes/questions before merging.
rx-java/rxgrpc-stub/src/main/java/com/salesforce/rxgrpc/stub/ClientCalls.java
Outdated
Show resolved
Hide resolved
rx-java/rxgrpc-stub/src/main/java/com/salesforce/rxgrpc/stub/ClientCalls.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like where this is going.
Can you refactor the CallOptions and default constants out into their own public ...stub.CallOptions
class? That way the ServerCalls class doesn't have to reference the internals of the ClientCalls class. This is also an opportunity to split out a getLowTide(CallOptions options)
and getPrefetch(CallOptions options)
function.
The last thing it needs is updated documentation explaining how and why to use the new call options.
Hi @koldat |
I have it in my queue, sorry. I will do next week as here are holidays now, ok? But feel free to modify the way you like if you want. |
There is no hurry. 😁 |
@rmichela, I have pushed another set. please review. |
BTW I am trying the same change in Reactor |
I have pushed Reactor support as well. Let me know if you like the changes and if you want to squash changesets to a big one. |
These changes look great! Thanks so much for the contribution. |
Do you plan to make a release sometimes? I would like to reference official build instead of custom we are using :) |
Yes. I'll comment here when released. |
v1.0.1 is released https://github.com/salesforce/reactive-grpc/releases/tag/v1.0.1 Thank you so much for driving this change! |
Thank you very much! Works great :) |
Default Flowable behavior on Client and Server sending side is to send messages into the queue with length 512. When there is too many concurrent calls and when messages are quite big it can cause OOM. This pull requests allows to override these for such RPC calls.
Client example:
Server example: