rocketmq: back-incompatible the RequestCode(`REGISTER_TOPIC_IN_NAMESRV`) with `217` value

  1. Please describe the issue you observed:

There was described the 217 code as GET_KV_CONFIG_BY_VALUE label, see here

  GET_KV_CONFIG_BY_VALUE = 217,

But since 5.0.0-beta, the RequestCode(217) may be reusable as REGISTER_TOPIC_IN_NAMESRV

https://github.com/apache/rocketmq/blob/ec5d3236f65786be7dde712dda5f5ee152d0dce6/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RequestCode.java#L133

Those two kind of RemotingCommand operations looks like incompatible, the one GET_KV_CONFIG_BY_VALUE mostly same as fetching and another REGISTER_TOPIC_IN_NAMESRV sames to pushing.

It’s suggest that toggle the REGISTER_TOPIC_IN_NAMESRV code to another one for the back compatible.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@Abhijeetmishr

  1. The REGISTER_TOPIC_IN_NAMESRV was added on 5.0+ version, but there were a lot of historic versions from 3.x to 4.x. In my opinion, toggle the one REGISTER_TOPIC_IN_NAMESRV to another code shall be a good choice.
  2. see https://github.com/ali-sdk/ali-ons/blob/master/lib/protocol/request_code.js#L108

Searching the github with GET_KV_CONFIG_BY_VALUE with language Java, there were a lots of public static final int GET_KV_CONFIG_BY_VALUE = 217; definitions on the rocketmq previous versions. The GET_KV_CONFIG_BY_VALUE is not a new RequestCode, It was already exists.

I think the code 217 was inappropriated mapping to REGISTER_TOPIC_IN_NAMESRV since 5.0.0-beta and sugguest that creating a new code, eg: something like 1217 for the REGISTER_TOPIC_IN_NAMESRV.

@Abhijeetmishr

@leizhiyuan @Oliverwqcwrw @Oliverwqcwrw are we planning to implement rocketmq-client-sdk for scala just asking if in case ?

cc @aaron-ai

@TheNorthMemory @leizhiyuan @Oliverwqcwrw can I pick this up ?

Sure, I assigned it to you 😃

@TheNorthMemory @leizhiyuan @Oliverwqcwrw can I pick this up ?

Sure, I’m not good at JAVA and glad to see it is solved.