zuul dynamic update and eureka health check configuration problem

spring cloud version:
<dependency>
	<groupId>org.springframework.cloud</groupId>
	<artifactId>spring-cloud-dependencies</artifactId>
	<version>Dalston.RELEASE</version>
	<type>pom</type>
	<scope>import</scope>
</dependency>


Phenomenon:
If eureka health check configuration is opened in zuul:
eureka:
  client:
    healthcheck:
      enabled: true
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/

When calling /refresh to dynamically refresh the routing configuration, zuul will throw a java.util.concurrent.RejectedExecutionException exception. Looking at the exception information, it seems that the initial size of the thread pool is 0.

Solution:
Turn off the health check or set the size of the health check thread pool.
eureka:
  client:
    healthcheck:
      enabled: true
    heartbeat-executor-thread-pool-size: 5
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/

Calling /refresh no longer throws an exception!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326396380&siteId=291194637