@PostConstruct
    public void init() {
        if (eurekaRegistration != null) {
            final int port = grpcProperties.getPort();
            if (GrpcUtils.INTER_PROCESS_DISABLE != port) {
                eurekaRegistration.getInstanceConfig().getMetadataMap()
                        .put(GrpcUtils.CLOUD_DISCOVERY_METADATA_PORT, Integer.toString(port));
            }
        }
    }
Configuration class that configures the required beans for grpc discovery via Eureka.

@author Michael (yidongnan@gmail.com)
@since 5/17/16
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/autoconfigure/GrpcMetadataEurekaConfiguration.java