0902horn commented on issue #700:
URL: 
https://github.com/apache/rocketmq-clients/issues/700#issuecomment-1988070453

   > > There are two points here:
   > > 
   > > 1. Maintaining consistent behavior with Java clients
   > > 2. Maintaining compatibility if the rocketmq server is not updated
   > 
   > For 1, Java impl does not check as thoroughly as possible; for 2, it's not 
reasonable enough to relax checks in C++ Impl; C++ does not offer a safe world 
by default, we need check things are right as thoroughly as possible; 
Otherwise, the project would soon be too hard to maintain.
   > 
   > In either case, it's not a bug in the C++ SDK, right?
   
   I thinks it is more about SDK consistency across different languages. We 
could fix it like this if you have security concern  about "default" in C++. 
   
   ```
       case rmq::AddressScheme::ADDRESS_SCHEME_UNSPECIFIED:
       case rmq::AddressScheme::DOMAIN_NAME: {
         service_endpoint.append("dns:");
         break;
       }
       default: {
         SPDLOG_ERROR("Unknown metric address scheme");
       }
   ```
   
   According to https://github.com/apache/rocketmq/issues/7896, this can be 
seen as a legacy issue and should be taken care of on SDK side. In fact, Java 
SDK works by dealing with this case in "default" statement, and so does C# 
version. So if C++ SDK doesn't work like this, it should be seen as a bug.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to