Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find class SourceConnector #130

Open
adampan0527 opened this issue May 10, 2022 · 18 comments
Open

cannot find class SourceConnector #130

adampan0527 opened this issue May 10, 2022 · 18 comments

Comments

@adampan0527
Copy link

Exception occurred while servicing http-request
java.lang.NoClassDefFoundError: io/openmessaging/connector/api/source/SourceConnector

@adampan0527
Copy link
Author

Caused by: java.lang.ClassNotFoundException: io.openmessaging.connector.api.source.SourceConnector

@adampan0527
Copy link
Author

API调用:
http://10.10.101.50:8081/connectors/replicatorTest?config={
"connector-class":"org.apache.rocketmq.replicator.RmqSourceReplicator",
"source-rocketmq":"10.109.121.108:9876",
"target-rocketmq":"10.109.11.140:9876",
"replicator-store-topic":"replicatorTopic",
"offset.sync.topic":"syncTopic",
"taskDivideStrategy":"0",
"white-list":"TopicTest,TopicTest2,fileTopic",
"task-parallelism":"4",
"connect-topicname":"replicatorTopic",
"source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"
}

@odbozhou
Copy link
Contributor

The latest replicator code has been merged, you can update the code and try again. If you have any questions, please communicate in time

@adampan0527
Copy link
Author

same problem occurred, topics are synced while messages are not. And it could not get name server, always found name server is null.

@LittleBoy18
Copy link
Contributor

#138 @odbozhou
发现个bug 修改后 topic可以同步 消息不能同步

@zhangjidi2016
Copy link
Contributor

this question is resolved in #134

@odbozhou
Copy link
Contributor

Do you have any other questions?

@LittleBoy18
Copy link
Contributor

使用了最新的master代码,消息还是不能正常在两个mq集群之间同步.
发现消息其实被存储在source mq集群的 ”connect-topicname“ 这个topic里
看代码 并没有找到 targetMQAdminExt 执行 同步source mq 消息到 target mq的逻辑
RmqSourceReplicator 的能力和文档描述有出入, 是只同步topic元数据并不具有同步消息的能力?
@odbozhou @zhangjidi2016

@LittleBoy18
Copy link
Contributor

image
我的请求url, 按照文档操作创建 replicator-store-topic 这个参数的topic,发现并没有什么什么用处,消息被转存到了connect-topicname这个参数设定的topic

@zhangjidi2016
Copy link
Contributor

我测试是将待同步的topic放在“connect-topicname”这个参数中,可以同步消息。
image

@LittleBoy18
Copy link
Contributor

我测试的结果:是将source mq集群 白名单设置的topic中的消息 转存到了 souce mq集群 "connect-topicname"参数设置的topic里
我期待的结果是消息同步到了target mq集群里,您这边是可以做到这个效果的吗
@zhangjidi2016

@zhangjidi2016
Copy link
Contributor

target mq这边设置没用到,消息默认同步到connect.conf中指定的mq集群,我这边为了测试方便,源/目的/runtime使用的集群都是同一个集群
image

@LittleBoy18
Copy link
Contributor

我runtime和source mq是同一个集群,target mq是另外一套,消息没同步到target mq集群里

@zhangjidi2016
Copy link
Contributor

同步消息的producer在初始化时连接到的是runtime使用的mq集群,消息直接同步到这个集群中

@LittleBoy18
Copy link
Contributor

看代码我目前确实没找到同步到target mq集群的逻辑,看来是需要自己再实现一下了

@odbozhou
Copy link
Contributor

我runtime和source mq是同一个集群,target mq是另外一套,消息没同步到target mq集群里

这样用法是有问题的,source是需要同步的集群A,runtime配置target mq集群B, 这样A集群的topic就可以同步到B集群。

@LittleBoy18
Copy link
Contributor

我runtime和source mq是同一个集群,target mq是另外一套,消息没同步到target mq集群里

这样用法是有问题的,source是需要同步的集群A,runtime配置target mq集群B, 这样A集群的topic就可以同步到B集群。

我按照你说的方法尝试了一下,消息是转存到了 runtime配置target mq集群B的connect-topicname里,消息并没有同步到 white-list 配置的topic中

@LittleBoy18
Copy link
Contributor

#145
readme 指导有错误,修改了点同步消息的逻辑,帮忙review一下吧 @odbozhou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants