Skip to content

feat: config unification — Duration migration + OutboxPurgerConfig (KOJAK-61)#16

Merged
endrju19 merged 8 commits intomainfrom
kojak-61-config-unification
Apr 14, 2026
Merged

feat: config unification — Duration migration + OutboxPurgerConfig (KOJAK-61)#16
endrju19 merged 8 commits intomainfrom
kojak-61-config-unification

Conversation

@endrju19
Copy link
Copy Markdown
Collaborator

@endrju19 endrju19 commented Apr 1, 2026

Summary

  • Migrate all time-based config from Long with units in names (intervalMs, retentionDays, intervalMinutes) to java.time.Duration without units (interval, retention) — follows Spring Boot conventions
  • Create OutboxPurgerConfig value object in okapi-core (matching existing OutboxSchedulerConfig pattern)
  • Migrate OutboxPurger constructor from raw parameters to config object
  • Add maxRetries to OutboxProcessorProperties (was hardcoded to 5)
  • Replace @Validated/@Min with require() in init blocks everywhere
  • Update spring-configuration-metadata.json with new Duration-typed keys

Breaking changes (pre-1.0)

Before After
OutboxSchedulerConfig(intervalMs = 1000) OutboxSchedulerConfig(interval = Duration.ofSeconds(1))
OutboxPurger(store, Duration.ofDays(7), 3600000, 100, clock) OutboxPurger(store, OutboxPurgerConfig(...), clock)
okapi.processor.interval-ms=1000 okapi.processor.interval=1s
okapi.purger.retention-days=7 okapi.purger.retention=7d
okapi.purger.interval-minutes=60 okapi.purger.interval=1h

Test plan

  • All okapi-core unit tests pass
  • All okapi-spring-boot unit tests pass
  • All integration tests pass
  • ./gradlew clean ktlintFormat check — BUILD SUCCESSFUL
  • No leftover intervalMs/retentionDays/intervalMinutes/@Validated/@Min references

@endrju19 endrju19 merged commit 5a3a77e into main Apr 14, 2026
7 checks passed
@endrju19 endrju19 deleted the kojak-61-config-unification branch April 14, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants