apache / apache/eventmesh

[Bug] Cannot subscribe message send by EventMeshHttpProducer via EventMeshTCPClient

Open
#5,227 3 comments 0 reactions 0 assignees View on GitHub
bug Stale
Dominant language
Java
Stars
1.8k
Forks
658
Avg merge
11h 29m
Merged PRs (30d)
52

Description

### 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

Mac

### EventMesh version

master

### What happened

I dont know it ia a feature or bug?Is EventMesh transport layer protocol independent?
An exception occured in https://github.com/apache/eventmesh/blob/c3d6548eb389a47e7f3f0eb60cca1b716b7ef7cc/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/session/push/SessionPusher.java#L111C1-L112C1
error message:
```
class org.apache.eventmesh.common.protocol.http.HttpCommand cannot be cast to class org.apache.eventmesh.common.protocol.tcp.Package (org.apache.eventmesh.common.protocol.http.HttpCommand and org.apache.eventmesh.common.protocol.tcp.Package are in unnamed module of loader 'app')
```

### How to reproduce

1. start event mesh
2. start a EventMeshTCPClient and subscribe topic test-topic
3. send a cloud event by EventMeshHttpProducer to topic test-topic

### Debug logs

```
class org.apache.eventmesh.common.protocol.http.HttpCommand cannot be cast to class org.apache.eventmesh.common.protocol.tcp.Package (org.apache.eventmesh.common.protocol.http.HttpCommand and org.apache.eventmesh.common.protocol.tcp.Package are in unnamed module of loader 'app')
```

### 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) *

Contributor guide

Open the contributing guide

Research direction

Start with eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/session/push/SessionPusher.java at the referenced lines, then reproduce with an EventMeshTCPClient subscribed to test-topic and an EventMeshHttpProducer sending to it. Trace how the HTTP HttpCommand reaches the TCP client and determine the expected transport-layer behavior. Done means the reproduction no longer throws the ClassCastException and the cross-client subscription behavior is defined and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.