qqeasonchen opened a new pull request, #5312:
URL: https://github.com/apache/eventmesh/pull/5312

   ## Summary
   
   Two production implementations of the Sub-PR A interfaces, plus the wiring 
into `ReliableDispatcher`.
   
   ## Changes
   
   **New files**
   - `MetaBackedDeadLetterStore` — idempotent DLQ ledger under 
`/em/dlq/<deliveryId>` via `MetaStore.putIfAbsent` CAS. First recorder wins; 
concurrent writers see the existing record and return true so the dispatcher 
proceeds to retire.
   - `MetaBackedTaskStore` — per-task record under `/em/tasks/<taskId>` with a 
self-describing `v1|<base64>` wire envelope. Variable-width fields (taskId, 
agentId, clientId, input, output) are base64-encoded before joining so opaque 
caller input containing `|` or newlines cannot corrupt the format. Status 
updates use `MetaStore.tryAcquire` as an epoch CAS, rejecting stale writers 
(issue #5291 style).
   - 3 unit tests: `MetaBackedDeadLetterStoreTest`, `MetaBackedTaskStoreTest`, 
`ReliableDispatcherDlqLedgerTest`.
   
   **Modified**
   - `ReliableDispatcher` — new 9-arg ctor that adds an optional 
`DeadLetterStore`. The legacy 8-arg ctor (Sub-PR A/B wire) is untouched and the 
DLQ path skips the ledger call when no store is wired. The DLQ transition now 
records the deliveryId on the ledger before retirement; a ledger failure is 
logged but does not block retirement (the downstream DLQ sink has already 
persisted the body).
   
   ## Scope
   
   | Issue | Status |
   | --- | --- |
   | #5292 (DLQ transition durable) | **fully fixed** — Sub-PR B's partial fix 
upgraded to ledger-backed |
   | #5302 (A2A parallel Runtime) | **unblocked** — TaskStore is now 
production-ready |
   | #5297 (A2A dispatch mode + TaskExpirer reaper) | deferred to Sub-PR D |
   
   ## Diff stat
   
   ```
   eventmesh-runtime/src/main/java/.../delivery/ReliableDispatcher.java       | 
 34 +++
   eventmesh-runtime/src/main/java/.../state/MetaBackedDeadLetterStore.java   | 
 90 ++++++++
   eventmesh-runtime/src/main/java/.../state/MetaBackedTaskStore.java         | 
242 +++++++++++++++++++++
   
eventmesh-runtime/src/test/java/.../delivery/ReliableDispatcherDlqLedgerTest.java
  | 132 +++++++++++
   eventmesh-runtime/src/test/java/.../state/MetaBackedDeadLetterStoreTest.java 
      |  68 ++++++
   eventmesh-runtime/src/test/java/.../state/MetaBackedTaskStoreTest.java     | 
137 ++++++++++++
   6 files changed, 703 insertions(+)
   ```
   
   ## Test plan
   
   - `./gradlew :eventmesh-runtime:test` — all Sub-PR A interface contract 
tests (DeadLetterStoreTest, TaskStoreTest) plus the 3 new tests above must pass.
   - `./gradlew :eventmesh-runtime:checkstyleMain 
:eventmesh-runtime:checkstyleTest` — must be clean (no new violations 
introduced).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to