-
Couldn't load subscription status.
- Fork 13
Introduce GrpcStreamBroadcaster to enable keep_alive options #154
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
Introduce GrpcStreamBroadcaster to enable keep_alive options #154
Conversation
Signed-off-by: Flora <[email protected]>
3ac5b3a to
09d5ca0
Compare
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.
Thank you @flora-hofmann-frequenz !
| except grpcaio.AioRpcError as e: | ||
| print(f"RPC failed: {e}") | ||
| return | ||
| receiver = broadcaster.new_receiver() |
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.
Oh, we get a receiver here. We can have two methods, one returning an iterator as we have now, another returning a receiver. That would be useful for you, correct @phillip-wenig-frequenz ?
Can be a subsequent PR though.
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.
Will add it in a follow up PR! (Issue #155)
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.
Actually you just need a function that returns a receiver, because the receiver is already an iterator.
| retry_strategy=None, | ||
| ) | ||
|
|
||
| receiver = broadcaster.new_receiver() |
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.
Same comment about the receiver method as above.
After a sensitivity analysis, the default
ChannelOptions()of the base client are used (with the option to change them), as even with different configurations ofKeepAliveOptions()ofintervalandtimeout, the client sometimes has to retry.