apache / apache/eventmesh

[Question] 关于类型转换问题

Open
#4,801 6 comments 0 reactions 0 assignees View on GitHub
need research question 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.

### Question

我用docker运行eventmesh 服务端,用rocketmq作为存储,用sdk中的http作为subsciber消费消息时,eventmesh.out的日志报如下错误,我猜测是因为不同的类加载器,导致的EventMeshConsumeConcurrentlyContext 和ConsumeConcurrentlyContext 不认,应该把plugin下的rocket-storage的包,拷贝到apps下能解决问题,
是否能重新打镜像包,放到库上?

tenerConcurrently.java:63) - handleMessage fail
java.lang.ClassCastException: org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext cannot be cast to org.apache.eventmesh.storage.rocketmq.patch.EventMeshConsumeConcurrentlyContext
at org.apache.eventmesh.storage.rocketmq.patch.EventMeshMessageListenerConcurrently.consumeMessage(EventMeshMessageListenerConcurrently.java:44) [eventmesh-storage-rocketmq-1.10.0-release.jar:1.10.0-release]
at org.apache.rocketmq.client.impl.consumer.ConsumeMessageConcurrentlyService$ConsumeRequest.run(ConsumeMessageConcurrentlyService.java:402) [rocketmq-client-4.9.5.jar:4.9.5]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181] 如何处理

Contributor guide

Open the contributing guide

Research direction

Start with the stack trace and read EventMeshMessageListenerConcurrently.java, especially the reported lines, then inspect the plugin/rocket-storage and apps packaging mentioned in the question. Reproduce the Docker deployment with RocketMQ and HTTP SDK consumption; done means the ClassCastException is resolved and message consumption completes without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.