Spring Boot 4: TimerRegistry is not refresh-scoped while the other five registries are

Author: anjeongkyunCreated Sep 26, 2026Updated Sep 26, 2026

resilience4j version: main (Spring Boot 4 module, added in #2384)

Java version: any

When Spring Boot 4 support landed, five *RefreshScopedRegistryAutoConfiguration classes came with it so the registries pick up a Spring Cloud Config refresh:

  • BulkheadRefreshScopedRegistryAutoConfiguration
  • CircuitBreakerRefreshScopedRegistryAutoConfiguration
  • RateLimiterRefreshScopedRegistryAutoConfiguration
  • RetryRefreshScopedRegistryAutoConfiguration
  • TimeLimiterRefreshScopedRegistryAutoConfiguration

The micrometer Timer did not get one, so TimerRegistry stays singleton-scoped. On a /actuator/refresh the other five registries are rebuilt from the new configuration and the timer registry keeps the values it started with.

It looks like an omission rather than a decision, because Timer is shaped like the others: TimerRegistry exists, TimerAutoConfiguration declares it as a @Bean with @ConditionalOnMissingBean, and TimerConfiguration.timerRegistry(...) is the same kind of factory the five refresh-scoped classes delegate to. The only difference is that timerRegistry takes one extra argument, a @Autowired(required = false) MeterRegistry.

RefreshScopedAutoConfigurationTest covers the five and has no timer case.

Happy to open a PR mirroring the existing five. If leaving Timer out was deliberate, say so and I will drop it.

Source: resilience4j/resilience4j