apache / rocketmq-client-cpp

Apache RocketMQ cpp client
https://rocketmq.apache.org/
Apache License 2.0
366 stars 158 forks source link

re-dev Cannot use accessKey, secretKey, accessChannel #357

Open lirong-Lee opened 3 years ago

lirong-Lee commented 3 years ago

I use the following code to add accessKey, secretKey, accessChannel

auto rpcHook = std::make_shared<rocketmq::ClientRPCHook>(rocketmq::SessionCredentials("LTAI4GGqhTNXtKsLtoKU8FMq", "xxxxxxxxxxxx", "ALIYUN"));
m_Producer.setRPCHook(rpcHook);

Connecting to Alibaba Cloud's rocketmq, the log reports an error: "No topic route info in name server for the topic:"

With the same parameters, I can send data normally using version 2.2.0; Use code:

m_Producer.setSessionCredentials("LTAI4GGqhTNXtKsLtoKU8FMq", "xxxxxxxxxxxx", "ALIYUN");

rocektmq-dev.log rocketmq-client-cpp-2.2.0.log

ifplusor commented 3 years ago

@lirong-Lee The support of namespace is not ok, it causes this issue.

lirong-Lee commented 3 years ago

@ifplusor What is the specific problem? How do i use

vongosling commented 3 years ago

@ShannonDing ping

ifplusor commented 3 years ago

@lirong-Lee I will fix this issue in the next few weeks.

lirong-Lee commented 2 years ago

@ifplusor Is there a chance to support this feature now

ifplusor commented 2 years ago

@ifplusor Is there a chance to support this feature now

Unfortunately, I have been busy with work in the past few months and have no time to fix this issue.

ifplusor commented 2 years ago

@lirong-Lee I'm so sorry, but could you do this by yourself and commit a PR? I will provide support as much as possible.

lirong-Lee commented 2 years ago

@ifplusor Can you tell me about which module to do this thing. I refer to the java version and master version to change it to see

ifplusor commented 2 years ago

@lirong-Lee As I say before, sdk do not process namespace for topic/group, you can see https://github.com/apache/rocketmq/blob/df4e98855d461d85e9c4ed43add1b12a58bca7b6/common/src/main/java/org/apache/rocketmq/common/protocol/NamespaceUtil.java#L71 And you can do this work on my repo, there are a lot of jobs about refactor that are not merged upstream.