Can we add mutil temporal connnect target in the spring config file?

Hi, everyone:
For now, we want to add mutil target and i have change config file like this:

server:
  port: 3030
spring:
  application:
    name: temporal-samples 
temporal:
    connection:
      target: ip:port,ip:port

But i gor this errror:: Invalid DNS name: ip:poer,ip:port.

So I’m not sure temporal have this function to support this config that add mutil target.
anyone can help me with this issue? Thanks in advance!

No not via config. Config uses this to create a single instance of WorkflowClient which is used to create your workers and can be injected in client code / activities / tests with:

@Autowired WorkflowClient client; // bean name is temporalWorkflowClient

Note that WorkflowClient is per namespace anyways.

If you need second WorkflowClient for your app thats used only in client code you would need to produce it yourself, for example in a @Configuration class:

@Bean(name = "secondClient")
  public WorkflowClient secondClient() {
    WorkflowServiceStubs service = WorkflowServiceStubs.newLocalServiceStubs();
    return WorkflowClient.newInstance(
        service, WorkflowClientOptions.newBuilder().setNamespace("xyz").build());
  }

and then you can autowire the default one from your config and your second one, for example:

  @Autowired
  @Qualifier("temporalWorkflowClient")
  WorkflowClient client;

  @Autowired
  @Qualifier("secondClient")
  WorkflowClient secondClient;