Visitar URL original
[Bug] In the SDK-Java HTTP subscription method, it is unable to subscribe to events from the HttpConnector Source. · Issue #5248 · apache/eventmesh · GitHub
Skip to content

[Bug] In the SDK-Java HTTP subscription method, it is unable to subscribe to events from the HttpConnector Source. #5248

Open

Description

@linyf-B

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

Activity

  1. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    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.

  2. Anon2Tokyo commented on Aug 8, 2026

    @Anon2Tokyo

    hi @linyf-B , Are you still working on fixing this issue? If not, I can handle it and submit a PR.

  3. linyf-B commented on Aug 10, 2026

    @linyf-B
    Author

    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.

  4. zhang-arvin commented on Aug 30, 2026

    @zhang-arvin
    Contributor

    I will work on this.

  5. zhang-arvin commented on Aug 30, 2026

    @zhang-arvin
    Contributor

    This issue is resolved by the uni-architecture rewrite. The AsyncHTTPPushRequest.java and the old org.apache.eventmesh.runtime.core.protocol.http.push package were removed. The new architecture uses LegacyHttpBridge which properly converts legacy HTTP wire format to CloudEvents and uses the new UniIngressService - the ClassCastException (Package vs HttpEventWrapper) cannot occur in the new code path.

    Closing as completed by the architecture redesign.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions