Repository navigation
[Bug] In the SDK-Java HTTP subscription method, it is unable to subscribe to events from the HttpConnector Source. #5248
Description
Search before asking
- I had searched in the issues and found no similar issues.
Environment
Linux
EventMesh version
master
What happened
tag v1.12.0:
In the SDK-Java HTTP subscription method, it is unable to subscribe to events from the HttpConnector Source.
How to reproduce
The source of the httpconnector in Eventmesh provides an HTTP interface to receive the data, and then writes it to Eventmesh. I used http in SDK-java to subscribe, but it got an error.
cloudevent to HttpEventWrapper occur except, group:CC, topic:table6a, bizSeqNo=c8cdbe62-5f7f-4484-b562-23ee1b28aa54, uniqueId=c8cdbe62-5f7f-4484-b562-23ee1b28aa54
java.lang.ClassCastException: org.apache.eventmesh.common.protocol.tcp.Package cannot be cast to org.apache.eventmesh.common.protocol.http.HttpEventWrapper
at org.apache.eventmesh.runtime.core.protocol.http.push.AsyncHTTPPushRequest.tryHTTPRequest(AsyncHTTPPushRequest.java:169) ~[eventmesh-runtime-1.11.0-release.jar:1.11.0-release]
at org.apache.eventmesh.runtime.core.protocol.http.push.HTTPMessageHandler.lambda$handle$2(HTTPMessageHandler.java:92) ~[eventmesh-runtime-1.11.0-release.jar:1.11.0-release]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_162]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_162]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
2026-05-06 09:54:11,167 WARN [eventMesh-pushMsg-2] AsyncHTTPPushRequest(AsyncHTTPPushRequest.java:179) - cloudevent to HttpEventWrapper occur except, group:TT, topic:table6a, bizSeqNo=49df2557-ddef-4641-a06a-9901ea15e645, uniqueId=49df2557-ddef-4641-a06a-9901ea15e645
java.lang.ClassCastException: org.apache.eventmesh.common.protocol.tcp.Package cannot be cast to org.apache.eventmesh.common.protocol.http.HttpEventWrapper
at org.apache.eventmesh.runtime.core.protocol.http.push.AsyncHTTPPushRequest.tryHTTPRequest(AsyncHTTPPushRequest.java:169) ~[eventmesh-runtime-1.11.0-release.jar:1.11.0-release]
at org.apache.eventmesh.runtime.core.protocol.http.push.HTTPMessageHandler.lambda$handle$2(HTTPMessageHandler.java:92) ~[eventmesh-runtime-1.11.0-release.jar:1.11.0-release]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_162]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_162]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
2026-05-06 09:54:11,167 WARN [eventMesh-pushMsg-2] AsyncHTTPPushRequest(AsyncHTTPPushRequest.java:179) - cloudevent to HttpEventWrapper occur except, group:CC, topic:table6a, bizSeqNo=49df2557-ddef-4641-a06a-9901ea15e645, uniqueId=49df2557-ddef-4641-a06a-9901ea15e645
java.lang.ClassCastException: org.apache.eventmesh.common.protocol.tcp.Package cannot be cast to org.apache.eventmesh.common.protocol.http.HttpEventWrapper
at org.apache.eventmesh.runtime.core.protocol.http.push.AsyncHTTPPushRequest.tryHTTPRequest(AsyncHTTPPushRequest.java:169) ~[eventmesh-runtime-1.11.0-release.jar:1.11.0-release]
at org.apache.eventmesh.runtime.core.protocol.http.push.HTTPMessageHandler.lambda$handle$2(HTTPMessageHandler.java:92) ~[eventmesh-runtime-1.11.0-release.jar:1.11.0-release]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_162]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_162]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_162]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
Debug logs
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 *
Activity
github-actions commentedon Aug 4, 2026
It has been 90 days since the last activity on this issue. Apache EventMesh values the voices of the community. Please don't hesitate to share your latest insights on this matter at any time, as the community is more than willing to engage in discussions regarding the development and optimization directions of this feature.
If you feel that your issue has been resolved, please feel free to close it. Should you have any additional information to share, you are welcome to reopen this issue.
Anon2Tokyo commentedon Aug 8, 2026
hi @linyf-B , Are you still working on fixing this issue? If not, I can handle it and submit a PR.
linyf-B commentedon Aug 10, 2026
Hi @Anon2Tokyo
Thanks for checking in! I'm not actively working on this fix right now, so please feel free to take it and submit a PR.
zhang-arvin commentedon Aug 30, 2026
I will work on this.
zhang-arvin commentedon Aug 30, 2026
This issue is resolved by the uni-architecture rewrite. The
AsyncHTTPPushRequest.javaand the oldorg.apache.eventmesh.runtime.core.protocol.http.pushpackage were removed. The new architecture usesLegacyHttpBridgewhich properly converts legacy HTTP wire format to CloudEvents and uses the newUniIngressService- the ClassCastException (PackagevsHttpEventWrapper) cannot occur in the new code path.Closing as completed by the architecture redesign.