Customizing Eureka Service Registration
You can customize various aspects of registration with Eureka using the EurekaConfiguration. Notice that EurekaConfiguration
extends DiscoveryClientConfiguration which in turn extends HttpClientConfiguration allowing you to customize the settings for the Eureka client, including read timeout, proxy configuration and so on.
Example Eureka Configuration
eureka:
client:
readTimeout: 5s
registration:
asgName: myAsg # the auto scaling group name
countryId: 10 # the country id
vipAddress: 'myapp' # The Eureka VIP address
leaseInfo:
durationInSecs: 60 # The lease information
metadata: # arbitrary instance metadata
foo: bar
retry-count: 10 # How many times to retry
retry-delay: 5s # How long to wait between retries
appname: some-app-name # optional, eureka instance application name, defaults to ${micronaut.application.name}
hostname: foo.example.com # optional, exposed eureka instance hostname, useful in docker bridged network environments
ip-addr: 1.2.3.4 # optional, exposed eureka instance ip address, useful in docker bridged network environments
port: 9090 # optional, exposed eureka instance port, useful in docker bridged network environments
Property | Type | Description |
---|---|---|
| int | |
| int | |
| java.lang.String | |
| java.lang.String | |
| java.lang.String | |
| ||
| int | |
| java.lang.String | |
| java.lang.String | |
| java.lang.String | |
| ||
| ||
| java.lang.String | |
| java.lang.String | |
| java.lang.String | |
| java.lang.String | |
| java.util.Map | |
| long | |
| long | |
| long | |
| long | |
| int | |
| int | |
| boolean | |
| java.time.Duration | |
| boolean | |
| boolean | |
| boolean | |
| int | |
| java.time.Duration | |
| java.lang.String |