Hello everyone,
The WorkflowServiceStubs is always used in java examples:
// WorkflowServiceStubs is a gRPC stubs wrapper that talks to the local Docker instance of the Temporal server.
WorkflowServiceStubs service = WorkflowServiceStubs.newInstance();
Do you have an example of how to connect to a remote Temporal server?
In a K8 environment where both temporal and the service wanting to connect to temporal were both running in the default namespace would the "host:port" be the `temporal-frontend` or `temporal-frontend-headless` service that needs to be connect to? e.g .setTarget("http://temporal-frontend:7233")
Either one would work with the difference is in how clients will end up being routed to specific frontend pods.
That said, the headless version of the service is more for service discovery (IPs of each pod) and the non-headless frontend provides an internally load balanced service (1 ip that is balanced across all available pods).
So the recommendation here would be to use the non-headless version unless you want clients to talk to specific frontends for some reason (not normally something you want to do).
I tried the same way for Temporal server in Docker image in a different machine.
I am able to the see the emporal Ui but this code gives me connection error.