You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eventmesh.apache.org by "qqeasonchen (via GitHub)" <gi...@apache.org> on 2026/09/09 06:35:21 UTC
[I] [Bug] Complete cluster-wide subscription routing for PARTITION_OWNED_PULL (eventmesh)
qqeasonchen opened a new issue, #5376:
URL: https://github.com/apache/eventmesh/issues/5376
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
### Environment
Other
### EventMesh version
Other
### What happened
`PARTITION_OWNED_PULL` only polls partitions owned by the local Runtime, but the default cluster bootstrap does not install a cluster-wide subscription routing path.
`UniIngressService.pullAndDispatch()` calls `partitionOwnership.ownedPartitions(topic)` and only polls the owned partitions. After a poll, it dispatches through the local `SubscriptionManager` unless its `cluster` field contains a `ClusterCoordinator`. However, `EventMeshApplication.enableCluster()` installs partition ownership but does not instantiate/inject a `ClusterCoordinator` via `UniIngressService.withCluster(...)`.
A subscriber connected to Runtime B can therefore be absent from Runtime A's local subscription table even when A owns the broker partition containing the event. The owner sees no local targets. Depending on backend cursor semantics, this risks non-delivery, repeated polling, or unbounded lag.
Relevant code:
- `UniIngressService.pullAndDispatch()` and `pullAndDispatchPartition()`.
- `UniIngressService.withCluster(...)`.
- `EventMeshApplication.enableCluster()`.
- `ClusterSubscriptionStore` for the available Meta-backed subscription abstraction.
### How to reproduce
1. Start two Runtime instances with a shared MetaStore and cluster mode enabled.
2. Register a subscriber for topic `orders` on instance B.
3. Arrange for instance A to own partition 0 of `orders`.
4. Publish an event to partition 0.
5. Observe that A polls the event, while dispatch uses A's local `SubscriptionManager` because `cluster` was never wired.
6. A has no target for B's subscriber.
Expected: partition ownership and subscription routing compose so every eligible cluster subscriber receives its event according to the selected distribution mode.
Actual: the partition owner may not see remote subscriptions in the default bootstrap.
### Debug logs
```Java
Recommended fix:
- Decide and document one cluster model: (a) partition owner uses a cluster-wide subscription store and forwards deliveries to the subscriber's Runtime, or (b) subscriptions/sessions migrate or colocate with the partition owner.
- Do not enable `PARTITION_OWNED_PULL` until the selected routing model is fully wired.
- Add two-instance black-box E2E tests against Kafka, RocketMQ 4.x, and RocketMQ 5.x covering remote subscriber delivery, ownership transfer, restart during in-flight delivery, and no-loss/no-duplicate assertions.
- Emit metrics for remote subscriptions, forwarding/migration, partitions with no eligible target, and ownership handoff latency.
The required template agreement checkboxes are intentionally left unchecked in this draft.
```
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [ ] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) *
--
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: issues-unsubscribe@eventmesh.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [I] [Bug] Complete cluster-wide subscription routing for PARTITION_OWNED_PULL (eventmesh)
Posted by "qqeasonchen (via GitHub)" <gi...@apache.org>.
qqeasonchen closed issue #5376: [Bug] Complete cluster-wide subscription routing for PARTITION_OWNED_PULL
URL: https://github.com/apache/eventmesh/issues/5376
--
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: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org