-
Notifications
You must be signed in to change notification settings - Fork 57
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
Migrate to GrpcChannel #556
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In order to use the dotnet native grpc.net channel we have to migrate to the new GrpcChannel. Previously, we still used the Grpc.Core channel which is backed with C code (non-native dotnet). There are several changes which have to be done in order to migrate to the new GrpcChannel. Important part is that ChannelOptions and Credentials doesn't work as before. 1. GrpcChannel uses internally HttpClient, which means we have to set the keepAlive on the SocketsHttpHandler. 2. User-agent header needs to be set via an interceptor. Co-authored-by: legalles <legalles@kappaeng.com>
Thank you, but I just wanted tp help, not waiting for awards ;) |
With the Grpc.net migration and the GrpcChannel we no longer can use the SslCredentials to set our certificate. This is kept for backwards compatibility, but will not accept any custom certificate. If we want specifiy a certificate we have to create a X509Certificate2 and set it on the SocketsHttpHandler in the specific SslOptions. Furthermore to allow custom self-signed certs we need to adjust the validation, otherwise the certificates are rejected.
In order to fail commands correctly after client has been disposed we use a ClosedGatewayClient, which directly fails on all commands.
In order to replace the client on dispose we mark it as volatile
Use new ZeebeClient.Connect method to await grpc readiness Use Timeouts to not forever await the topology request (was problem before) Add delays between retries Add max retry count to not retry for ever Add better logging to understand what happens on the await
Add new configuration to allow untrusted certificates, useful for testing but dangerious for production so it needs to be configured explicitly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to use the dotnet native grpc.net channel we have to migrate
to the new GrpcChannel. Previously, we still used the Grpc.Core
channel which is backed with C code (non-native dotnet).
There are several changes which have to be done in order to migrate to
the new GrpcChannel. Important part is that ChannelOptions and
Credentials doesn't work as before.
the keepAlive on the SocketsHttpHandler.
Resources I used:
Thanks to @xlegalles for his previous PR #517, which contained already several changes. Sorry that I wasn't able to see the need for it before. I mark you as co-author on some changes :)
Closes #502
closes #554