Integration Server 10.11 | Microservices Runtime Guide | Consul Support | Consul Public Services Folder | pub.consul.client:getAllHostsForService
 
pub.consul.client:getAllHostsForService
WmConsul. Queries the Consul server for a list of active hosts that have registered the given microservice with Consul.
Input Parameters
registryAlias
String. Optional. Alias to use to connect to a Consul server. If you do not specify this parameter, the service uses the default Consul server alias
microserviceName
String. Microservice for which you want to retrieve a list of active hosts.
Output Parameters
hostList
String List. An array containing the names of hosts of the microservice. Each element is in the format host:port (for example, appserver.xyz.com:4555). If there are no hosts registered for the given microservice, returns null.