Skip to content
Bluetape4k docs1.11

Lifecycle, testing, and ecosystem path

Latest stable Based on Bluetape4k release 1.11.0

Required levelChoiceResponsibility
Direct Redisson objectsbluetape4k-redissonClients, codecs, batch/transaction, streams, coroutines, local cached maps
Spring Cache annotationsbluetape4k-cache-redissonCacheManager, regions, and Spring Cache integration
Database repository cachebluetape4k-exposedLoader/writer-backed entity repositories
Guided practiceExposed WorkshopCache-aside, read/write-through, Near Cache, and measurement

Higher layers still depend on client, codec, invalidation, and shutdown behavior from this module.

  1. Fix configuration and codec.
  2. Create one client and pass its health check.
  3. Attach maps, listeners, and near-cache references.
  4. Stop new work and drain write-behind and consumers during shutdown.
  5. Destroy near-cache instances, then shut down the client.

Let Spring own a managed bean. Close directly created clients in production and tests to avoid leaking threads and connections.

Observe connected nodes and pool use, command percentiles and timeout, retry and reconnect, batch size, rollback, Stream pending age and claims, local-cache hit and invalidation rates, stale incidents, writer backlog and drain time, codec failures, and payload size.

A high hit ratio is not healthy when stale-data incidents also rise. Measure freshness against the source of truth.

AbstractRedissonTest provides the Redis Testcontainer and shared fixture. Continue through client configuration, batch/transaction, future/coroutine, local-cache, configuration validation, and codec tests in that order.

Terminal window
./gradlew :bluetape4k-redisson:test --no-build-cache --no-configuration-cache

This is a Docker-backed Testcontainers task. Serialize it with other database and Redis suites. Add Redis restart, Pub/Sub disconnect, latency injection, and process shutdown to application-level failure tests.

Trace data flow before API names: whether the first request reads the database and fills cache, whether misses call a loader, and whether writes pass through a writer. Benchmark reports should include environment, payload, metric direction, and allowed staleness rather than copying headline numbers.