-
Notifications
You must be signed in to change notification settings - Fork 158
Expose OrchestratorServiceStubs #1057
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
c2c7a07
to
b945e10
Compare
cb97813
to
ba39824
Compare
temporal-serviceclient/src/main/java/io/temporal/serviceclient/OperatorServiceStubs.java
Show resolved
Hide resolved
temporal-serviceclient/src/main/java/io/temporal/serviceclient/ChannelManager.java
Outdated
Show resolved
Hide resolved
this.channel = options.getChannel(); | ||
this.grpcConnectionManager = null; | ||
} else { | ||
this.channel = prepareChannel(); |
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.
To confirm, by default we are intentionally creating separate channels for different gRPC services on the same server? I haven't put in thought to how the API would look if you wanted to share them, but I just want to make sure that is intentional.
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.
Yes. By default, every Stubs creates its own channel. It happens now if we create several WorkflowServiceStubs too. At the same time, if the users really want, they can reuse the channel. I exposed ServiceStubs#getRawChannel and the channel can be taken from the existing stubs and reused in the Options for a new stub.
Also, keep in mind that a regular App shouldn't be creating OperatorServiceStubs at all.
temporal-serviceclient/src/main/java/io/temporal/serviceclient/OperatorServiceStubsImpl.java
Outdated
Show resolved
Hide resolved
26704b8
to
22a01ed
Compare
a070874
to
afb5f01
Compare
Allow users to register search attributes using sdk Refactoring of WorkflowServiceStubs to reduce code duplication Issue temporalio#882
What was changed
WorkflowServiceStubsImpl was refactored to reduce code duplication
Why?
Allow users to register search attributes using sdk
Refactoring of WorkflowServiceStubs to reduce code duplication
Closes #882