Assembler v0.6.5
This release focuses on performance and consistency optimization of caching, including the auto caching feature.
What's Changed (from Git Commit messages)
- Cache concurrency optimization by switching to
MULTIPLE_READERS
strategy when caching fetchFunction is guaranteed to be empty - Ability to configure Retry strategies with specific
Scheduler
in concurrent cache, sameScheduler
used for auto cache and retry strategies - Ref count instead of boolean flag to manage start/stop in
concurrentLifeCycleEventListener()
Breaking API changes:
concurrency()
factory methods renamed toxxxRetryStrategy()
inAutoCacheFactoryBuilder
var assembler = assemblerOf(Transaction.class)
.withCorrelationIdExtractor(Customer::customerId)
.withAssemblerRules(
rule(BillingInfo::customerId, oneToOne(cached(this::getBillingInfo,
autoCacheBuilder(billingInfoFlux)
.maxWindowSizeAndTime(100, ofSeconds(5))
.errorHandler(error -> logger.log(WARNING, "Error in autoCache", error))
.scheduler(newParallel("billing-info"))
.maxRetryStrategy(50) // used to be named `concurrency()`
.build()))),
rule(OrderItem::customerId, oneToMany(OrderItem::id, cached(this::getAllOrders,
autoCacheBuilder(orderItemFlux)
.maxWindowSize(50)
.errorHandler(onErrorMap(MyException::new))
.scheduler(newParallel("order-item"))
.backoffRetryStrategy(100, ofMillis(10)) // used to be named `concurrency()`
.build()))),
Transaction::new)
.build();
Dependencies upgrades
- Project Reactor 3.5.6
- Kotlin 1.8.21