Microgateway 10.7 | webMethods Microgateway Help | Service Registry Support | Service Registry Configuration
 
Service Registry Configuration
You can configure service registry settings in one of the following ways:
*By configuring the service registry settings in the user-defined custom settings YAML file that is passed as an argument using the -c option during Microgateway startup.
*By downloading the service registry settings from API Gateway using the -ds option with the value true during Microgateway startup. The downloaded settings are merged with the settings from the custom settings YAML file. The downloaded settings take preference over the values in the custom settings YAML file in case of conflict during the merge.
To control the registration of APIs in a runtime service registry, the Microgateway custom settings file provides a publish section.
The publish section in the custom settings file is as follows:
publish:
registries:
- EurekaDefault
The publish section contains the registry names referencing the Service Registries. The APIs are only published to the specified service registries during Microgateway startup. To address all the configured service registries, use * as the registry name. Microgateway does not support API-specific registration. Either all or none of the APIs are published to the configured registries. The referenced registries point to the entries in the service_registries section in the custom settings file.
The yaml section for the service registry looks as follows:
service_registries:
EurekaDefault:
type: serviceRegistryAlias
description: Eureka is a REST based service that is primarily used in the
AWS cloud for locating services for the purpose of load balancing
and failover of middle-tier servers
owner: Administrator
endpointURI: http://localhost:9091
heartBeatInterval: 0
discoveryInfo:
path: /eureka/apps/{app}
httpMethod: GET
registrationInfo:
path: /eureka/apps/{app}
httpMethod: POST
deRegistrationInfo:
path: /eureka/apps/{app}/{instanceId}
httpMethod:DELETE
serviceRegistryType: EUREKA
connectionTimeout: 30
readTimeout: 30
The table lists the variables in the yaml file, their description and their usage.
Variable
Description
name
Name of the registry
serviceRegistryType
Type of the registry.
It is either EUREKA or SERVICE_CONSUL
connectionTimeout
Specifies the time, in seconds, for which the Microgateway tries to connect to the registry.
readTimeout
Specifies the time, in seconds, for which the registry tries to connect to the service endpoint.
endpointURI
The path of the registry.
discoveryInfo
Information required to discover the registry
path. The rest path of the registry to register services
http Method. The rest path of the registry to register services.
registrationInfo
Information required to register services.
path. The rest path of the registry to register services.
http Method. The rest path of the registry to register services.
deRegistrationInfo
Information required to deregister services.
path. The rest path of the registry to deregister services.
http Method. The rest path of the registry to deregister services.
customHeaders
A map of all custom Headers you need to reach your registry.
This is required only if you use consul with "X-Consul-Token" : "" as entry.
username
Optional. The username of the user authorized to to register services at your registry.
password
Required if you are using the username. Specifies the password of the user authorized to to register services at your registry.