Repository navigation
What happens after a failure, and tenants carried all the way through. Everything is an addition and off by default where it changes behavior: a way out for messages and publications that keep failing, tenant-scoped cache, idempotency and rate-limit keys, an expiry index and batched cleanup for the processed message table, a Grafana dashboard and alert rules, ddk.web.not-found-as-404, and reproducible builds, so the files on Maven Central match the GitHub Release byte for byte. The tracer starter leaves preview; the MCP starter stays one. Two fixes change a response: a constraint on a controller parameter now gives VALIDATION_ERROR, and a page sorted by a field that is no column of the PO gives 400 VALIDATION_ERROR instead of 500. The upgrade guide lists both and how to roll back; 1.0.x and 1.1 can run side by side on the same database. The outside trial the roadmap asked for before 1.1 was waived by the maintainer, as recorded in the roadmap.
Added
- A way out for a RocketMQ message that always fails. With
ddk.event.rocketmq.consumer.max-attempts, a message that fails that many times in a consumer group goes to the application'sUndeliverableEventHandler, with its headers, its body as received and the last exception. If the handler returns, the message counts as consumed and an orderly queue moves on; if it throws, the message is retried as before. Setting a limit without a handler fails at startup, because DDK never drops a message on its own. The default, 0, keeps the old behavior: an orderly queue waits until the message succeeds ddk.event.maintenance.resubmit-max-attempts: a failed publication that has been tried that many times, the first publication included, is no longer resubmitted and staysFAILED. The default, 0, resubmits without limit as before- Keys that carry the tenant, off by default. With
ddk.cache.tenant-scoped, a cache keeps one entry per tenant fromOperatorContext(<prefix><cache>::@<tenant>:<key>) and a call without a tenant fails;ddk.cache.caches.<name>.tenant-scopedturns it off for data that all tenants share. Withddk.concurrency.tenant-scoped, the keys of@Idempotentand@RateLimitcarry the tenant, so each tenant has its own request ids and its own quota; calls without a tenant share one.@AggregateLockis unchanged.ddk-example-inventoryhas atenantprofile with sales channels as tenants, checked on the JVM and in the native image smoke test - An expiry index on
processed_atfor the processed message table, created on startup, also for a table an earlier version created.ddk.event.maintenancepurges the table in batches ofddk.event.maintenance.inbox-purge-batch-size(1,000) that commit one by one, so a large backlog no longer turns into one longDELETE.IdempotentConsumer.purgeOlderThan(Duration, int)andprepare(boolean)are new; withddk.event.inbox.initialize-schema=falsea missing index is logged with the statement that adds it monitoring/: a Grafana dashboard for projections, integration events and the two-level cache, and Prometheus alert rules for failing and lagging projections, failed publications, stuck consumer groups, send errors and Redis errors, with promtool unit tests that CI runs.ddk-example-inventoryexposes/actuator/prometheus, and a test checks that the metrics the dashboard and the rules use appear thereevals/: an evaluation set for coding agents. Four tasks on projects generated from the archetypes: a new aggregate on four and on three layers, a change to an existing table, and a prompt that suggests breaking a layering rule. Hidden tests grade the result; the architecture test and existing migrations must stay unchanged.scripts/run-agent-eval.py --agent CMDruns an agent; CI checks that every grader fails on the bare project and passes with the task's reference solutionddk.web.not-found-as-404, off by default: aBusinessExceptionwhose code isNOT_FOUNDor ends in_NOT_FOUND, such asORDER_NOT_FOUND, gets 404 instead of 400, with the same body and code, and the API docs list a 404 response.BaseExceptionHandler(boolean)is the new constructor behind it; the no-argument constructor keeps 400 for every business error- Reproducible builds.
project.build.outputTimestampis set, andscripts/set-release-version.shsets it to the commit time of the release tag, in the release workflow and in the maintainer's build for Maven Central alike, so both produce the same files byte for byte. CI rebuilds every change and compares the files withmaven-artifact-plugin. After a release,scripts/check-release-checksums.py X.Y.Zcompares the SHA-256 of every file of the GitHub Release with the file on Maven Central
Fixed
- Projects generated from the archetypes had no
.gitignore, sogit add -Acommittedtarget/. They now ignore build output, IDE files and.claude/settings.local.json; the skills under.claude/skills/stay tracked. Both Maven's resources plugin and the archetype plugin drop.gitignoreby default, so the archetype build turns that off, and the archetype integration tests check that the file is generated - A constraint on a controller parameter, such as
@RequestParam("q") @Size(max = 5)or@PathVariable("id") @Positive, failed with400 BAD_REQUESTand the generic messageBad Request, because Spring MVC reports it asHandlerMethodValidationExceptionand the fallback handler answered it like any other MVC error. It is now400 VALIDATION_ERRORwith each parameter under the name used in the request, as for@Validrequest bodies. The HTTP status is unchanged; a client that matchedBAD_REQUESTfor these requests sees the documentedCommonErrorcode instead - The ID generators in
ddk-example-userandddk-mallcalled Hutool'sIdUtil.getSnowflakeNextId(), which ignoresddk.mybatis.worker-idanddatacenter-id, although their comments said to set them for several instances. They now use theIdentifierGeneratorthat the MyBatis starter registers, the one behindIdType.ASSIGN_ID, and a test checks that the configured worker and data center end up in the IDs - The native image of
ddk-example-inventorynever exited after SIGTERM: on JDK 25, Netty frees direct buffers throughArena.ofShared, which a native image supports only with-H:+SharedArenaSupport, so Lettuce's event loop threads failed during shutdown. The example now sets the build argument, SUPPORT.md says when an application needs it, and the native smoke test fails when the application does not stop within 30 seconds - A projection mark that keeps failing no longer drops out of
ddk.projection.failingandProjections.failureswhen its entry changes again. A new mark reset the attempt count and the last error, so an entry that changed often and never refreshed looked healthy. A new mark now makes the entry due at once and keeps both, until a refresh succeeds scripts/ddk.shfailed on JDK 21 updates before 21.0.8, deep in the Error Prone compiler, because it built every version from source. It now downloads a release from 0.10.0 on from Maven Central, which needs only Java 21, and checks for JDK 21.0.8 before it builds a snapshot from source. Releases before 0.10.0 still build on any JDK 21GenericRepository.pageonly sorts by a column of the repository's PO. A sort field may be the property name or the column name, and a column renamed with@TableFieldnow sorts correctly. A field that is not a column, or a column marked@TableField(select = false), fails withVALIDATION_ERROR, which the web starter answers with 400. Before, an unknown field reached the database and came back as 500SYSTEM_ERROR. A column that is never selected, such as a password hash, could also be used to sort, and the order of the results gave away its relative values.QueryParser.parse(query, entityClass)is the new overload behind this;parse(query)keeps the identifier check onlyddk.event.consume.failures{group}no longer stays at its last value when a rebalance moves a failing queue to another instance. The failures were cleared only by a success on the same instance, so the gauge kept reporting a queue this instance no longer consumed until it restarted, an alert that could not be cleared. A queue that has not failed on this instance for five minutes no longer counts; orderly consumption retries every second, so a queue that is still stuck here keeps counting
Changed
- Generated projects, after a trial run of the 1.0.1 archetype: the skills for a new aggregate or feature have the application pre-generate IDs through an
*IdGeneratorport backed by the MyBatis starter'sIdentifierGenerator, so events raised on creation carry the ID; they used to suggestIdType.ASSIGN_ID, which leaves the new aggregate without an ID until it is inserted.AGENTS.mdand the skills say that a domain event needsInstant occurredOn, and the README explains the three warnings a new project logs at startup, thatLongfields are JSON strings, and how to add API docs - The tracer starter is no longer a preview, as COMPATIBILITY.md set out: export is tested in CI against an OpenTelemetry Collector container, which receives a request and its
@Asyncwork as one trace. Its properties and behavior now follow the same compatibility rules as the other starters - Preview change, MCP starter: the audit log names the operator and tenant of each tool call,
MCP tool [cancel_order] by [support] in tenant [-] -> SUCCESS in 12 ms, with-when there is none. The tool interception now wraps@Idempotent,@AggregateLockand@RateLimiton the same method, so arguments are checked first and a repeated request, a busy aggregate or a rate limit comes back to the agent with its error code and is audited.ddk-mall'scancel_ordertakes arequestIdand is@Idempotent, so an agent that retries after a timeout does not cancel twice - Redisson 4.8.0 (was 4.7.0) and ShedLock 7.12.0 (was 7.10.1). Both are minor updates with no change to the API that DDK or applications use; ShedLock retries extending a kept-alive lock after a transient failure.
- Patch updates on the same lines: Spring Boot 4.1.3 (was 4.1.2), Spring AI 2.0.3 (was 2.0.2), Spring Modulith 2.1.3 (was 2.1.2), MyBatis-Plus 3.5.19 (was 3.5.18.1) and springdoc 3.2.1 (was 3.2.0). Projects generated from the archetypes use Spring Boot 4.1.3. DDK stays on Spring Boot 4.1 in 1.1; the MCP protocol is still 2025-11-25.