Bulkhead Properties Configuration

您可以在应用的配置属性文件中配置 ThreadPoolBulkheadSemaphoreBulkhead 实例。属性配置的优先级高于 Java Customizer 配置。

You can configure ThreadPoolBulkhead and SemaphoreBulkhead instances in your application’s configuration properties file. Property configuration has higher priority than Java Customizer configuration.

resilience4j.thread-pool-bulkhead:
    instances:
        backendA:
            maxThreadPoolSize: 1
            coreThreadPoolSize: 1
resilience4j.bulkhead:
    instances:
        backendB:
            maxConcurrentCalls: 10

要获取 Resilience4j 属性配置的更多信息,请参见 Resilience4J Spring Boot 2 Configuration

For more inforamtion on the Resilience4j property configuration, see Resilience4J Spring Boot 2 Configuration.