What is the difference between eureka.instance.instance-id and eureka.instance.metadataMap.instanceId? I ran 2 instances of same service on same host (localhost) and to have a unique instanceId, I tried both eureka.instance.instance-id and eureka.instance.metadataMap.instanceId. Both properties worked fine and service instances registered successfully with eureka server.
I found below post where both the option are given
how to create multiple instances of eureka services registered into eureka service registry?
So, what is the difference between them and where should I use these properties?