qqeasonchen opened a new pull request, #5317:
URL: https://github.com/apache/eventmesh/pull/5317
## 概述
`feat(cluster): PARTITION_OWNED_PULL delivery topology`(issue #5309, closes)。
一次性全量 PR 覆盖 #5309 全部 5 个 sub-step。
## 变更内容(5 commits)
1. **c50dcd9** — `feat(cluster): add DeliveryTopology enum + fail-fast
parser`
- 新增 `DeliveryTopology` 枚举(`LOCAL_STICKY_PULL` / `PARTITION_OWNED_PULL`)
- `fromConfig(String)` 解析器:null/空 → 默认;未知值 →
`IllegalArgumentException`(fail-fast)
2. **f9d33a5** — `feat(cluster): wire PARTITION_OWNED_PULL topology into
UniRuntime`
- 拆构造器:原 6-arg 保留(默认 LOCAL_STICKY_PULL, "standalone"),新增 9-arg
- `start()` 检测 topology == PARTITION_OWNED_PULL 时调
`startPartitionOwnership()`
- `startPartitionOwnership()` 构造 `ClusterMembership` +
`PartitionOwnership` + `InMemoryMetaStore`
- `shutdown()` 先调 `stopPartitionOwnership()` 释放 Meta 分配记录
3. **3de32f6** — `test(cluster): PARTITION_OWNED_PULL wiring E2E + parser
tests`
- `DeliveryTopologyTest`(7 case):null/empty/blank/精确名/trim/未知值/小写
- `UniRuntimeTopologyWiringTest`(3 case):双实例 PARTITION_OWNED_PULL
收敛于全覆盖不重复、LOCAL_STICKY_PULL 从不分配分区、null topology fail-fast
4. **1747c20** — `docs(uni-arch): add DeliveryTopology dual-topology matrix
to §13.2.10`
- 更新 §13.2 status banner(blocker 已解除)
- 新增 §13.2.10 双拓扑矩阵:9 维度对比 + 选型语义 + 启动流程 + 与原 §13.2.8 设计差异 + 验证覆盖
5. **936681c** — `fix(docs): rename dual-topology section to §13.2.11`
- §13.2.10 已被 #5293/PR #5308 占用("统一投递拓扑"),新章节重命名 13.2.11 避免冲突
## 双拓扑矩阵摘要
| 维度 | LOCAL_STICKY_PULL(默认) | PARTITION_OWNED_PULL |
|---|---|---|
| 适用 | 单实例 / 低吞吐 | 生产 HA / scale-out |
| Meta 依赖 | 无 | 必须(Nacos/etcd/ZK) |
| 启动开销 | 零 | ClusterMembership + PartitionOwnership + heartbeat |
| 代码入口 | 6-arg 构造(不变) | 9-arg 构造 + `withClusterMeta()` 注入 |
## 验证
- [x] `./gradlew :eventmesh-runtime:checkstyleMain :checkstyleTest` 通过
- [x] `:eventmesh-runtime:test --tests DeliveryTopologyTest` 7/7 通过
- [x] `:eventmesh-runtime:test --tests UniRuntimeTopologyWiringTest` 3/3 通过
- [x] `:eventmesh-runtime:test --tests ClusterDeliveryFaultTest` 5/5 通过(无
regression)
- [x] `:eventmesh-runtime:test --tests UniRuntimeTest` 1/1 通过(无 regression)
## 后续
- Testcontainers(Kafka + Nacos)E2E 测试:本地无 Docker,PR 描述已注明,由 follow-up 账号负责
- EventMeshApplication 集成 `eventmesh.delivery.topology` 配置项:未在本 PR 实现
## 关联
- closes #5309
- blocks #5295(deprecation 清理:PartitionOwnership @Deprecated
解除后,MetaBackedOffsetStore 等可推进)
--
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]