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

Question: Best practice for using ClientChannel #709

Open
payam-zahedi opened this issue May 3, 2024 · 4 comments
Open

Question: Best practice for using ClientChannel #709

payam-zahedi opened this issue May 3, 2024 · 4 comments

Comments

@payam-zahedi
Copy link

payam-zahedi commented May 3, 2024

Hey everyone thanks for this awesome library

What is the best practice when we are using ClientChannel?

Should have a ClientChannel for each call and shutdown the connection after the call finished?
Should we have a ClientChannel per ServiceClients?
Should We have a single ClientChannel for everything?

When do we need to shutdown the ClientChannel?

@payam-zahedi
Copy link
Author

@mraleph Can you help us in here ?

@mosuem
Copy link
Contributor

mosuem commented Jun 12, 2024

The connection should be managed by the channel, see the getConnection() method.

Or am I misunderstanding @payam-zahedi?

@payam-zahedi
Copy link
Author

payam-zahedi commented Jun 21, 2024

Thanks @mosuem for response

I'm sorry I used ClientCollection instead of ClientChannel

I'll Update the issue

@payam-zahedi payam-zahedi changed the title Question: Best practice for using ClientConnection Question: Best practice for using ClientChannel Jun 21, 2024
@mosuem
Copy link
Contributor

mosuem commented Jun 21, 2024

@wenbozhu Is there any cross-language guidance on the lifecycle of gRPC channels?

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

No branches or pull requests

2 participants