Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
bdd6d9d
Configure backoffs from application settings
reactivestudio Nov 8, 2026
b4a3312
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 8, 2026
3362251
Depend on the Spring module of backoff
reactivestudio Nov 8, 2026
db030e6
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 8, 2026
18ac90d
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
aad15d7
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
8dc40fe
Register backoffs through registrars in the auto-configuration
reactivestudio Nov 9, 2026
1473225
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
c6172a6
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
1bdab69
Register backoff beans after every registrar
reactivestudio Nov 9, 2026
9885960
Customize the backoff registry through beans
reactivestudio Nov 9, 2026
fd5ced3
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
1ca8bce
Cover backoff beans replacing the settings
reactivestudio Nov 9, 2026
d4fee59
Apply settings and beans through the standard customizer
reactivestudio Nov 9, 2026
59a8b4d
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
e6faefb
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
2b662e5
Use the default backoff name in the auto-configuration tests
reactivestudio Nov 9, 2026
520c952
Fill the backoff registry in the auto-configuration
reactivestudio Nov 9, 2026
8d74ef0
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
93dd9a4
Name the validation of the default backoff
reactivestudio Nov 9, 2026
6ad4632
Pick backoff algorithms from factory beans in the auto-configuration
reactivestudio Nov 9, 2026
740c103
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
251d17e
Say that the name of the default backoff is reserved
reactivestudio Nov 9, 2026
c6c4e0b
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 9, 2026
e2b5d5e
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
4817c16
Fill the backoff registry through the properties registrar
reactivestudio Nov 10, 2026
9c24cbd
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
8e92384
Bind backoff settings by the key of their type in the auto-configuration
reactivestudio Nov 10, 2026
421e221
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
25b077d
Put the misspelled field under its type in the auto-configuration test
reactivestudio Nov 10, 2026
3ef32e7
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
1dd0b7f
Describe relaxed backoff names in the settings guide
reactivestudio Nov 10, 2026
c91d1cc
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
78d0fb9
Wrap the start failures paragraph of the settings guide
reactivestudio Nov 10, 2026
935a788
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
238d2c1
Name the backoff factory beans of the auto-configuration by their type
reactivestudio Nov 10, 2026
bd771ef
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
2237a7a
Bind backoff settings through properties in the auto-configuration
reactivestudio Nov 10, 2026
0f3999c
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
1ba224f
Merge branch 'resilience-backoff-spring-boot' into resilience-backoff…
reactivestudio Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Name the validation of the default backoff
  • Loading branch information
reactivestudio committed Nov 9, 2026
commit 93dd9a4c8e5cd11f5663e0bdd527b3390944bb35
13 changes: 7 additions & 6 deletions architecture/pattern/resilience/backoff/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ registry.getOrDefault("inventory") // the default block for a name with no setti
registry.default
```

With nothing set, the `default` block has the values shown above, `delay` is `1s` and there is no jitter: it
applies only where `jitter` is set. `jitter: 0` on an instance turns off the jitter of `default`. An instance takes the fields it leaves out from `default`, including `type`. Any `Backoff` bean is
available by its bean name and replaces the settings of an instance with that name; a bean named `default`
replaces the default block. To change the registry from code, declare a `BackoffRegistryCustomizer` bean: it gets
the filled registry, settings and beans alike, and may go through `names`, `register` and `replace`.
Customizers run in `@Order`.
With nothing set, the `default` block has the values shown above except `jitter`, and `delay` is `1s`. Jitter
applies only where `jitter` is set; `jitter: 0` on an instance turns off the jitter of `default`. An instance
takes the fields it leaves out from `default`, including `type`. Any `Backoff` bean is available by its bean
name and replaces the settings of an instance with that name; a bean named `default` replaces the default
block. To change the registry from code, declare a `BackoffRegistryCustomizer` bean: it gets the filled
registry, settings and beans alike, and may go through `names`, `register` and `replace`. Customizers run in
`@Order`.

Wrong settings stop the application at start, with the name of the instance, even when a bean replaces it:
an unknown field or type, a value the `Backoff` being built refuses, a field of an instance that its type does
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ public class BackoffAutoConfiguration {
private fun initBackoffRegistry(registry: BackoffRegistry, properties: BackoffConfigurationProperties) {
val factory = BackoffFactory(properties.default)

BackoffType.entries
.map { type -> BackoffProperties(type = type) }
.forEach { instance -> createBackoff(factory, DEFAULT_BACKOFF_NAME, instance) }
validateDefault(factory)
properties.instances.forEach { (name, instance) -> registerBackoff(registry, factory, name, instance) }
registerBackoff(registry, factory, DEFAULT_BACKOFF_NAME, BackoffProperties())
}

private fun validateDefault(factory: BackoffFactory) = BackoffType.entries
.map { type -> BackoffProperties(type = type) }
.forEach { instance -> createBackoff(factory, DEFAULT_BACKOFF_NAME, instance) }

private fun registerBackoff(
registry: BackoffRegistry,
factory: BackoffFactory,
Expand Down
Loading