RockteMQ-AI commented on code in PR #463:
URL: https://github.com/apache/rocketmq-connect/pull/463#discussion_r3839500181


##########
connectors/rocketmq-replicator/src/main/java/org/apache/rocketmq/replicator/ReplicatorSourceTask.java:
##########
@@ -699,9 +717,9 @@ public void start(KeyValue config) {
         
connectorConfig.setDestInstanceId(config.getString(ReplicatorConnectorConfig.DEST_INSTANCEID));
         
connectorConfig.setDestEndpoint(config.getString(ReplicatorConnectorConfig.DEST_ENDPOINT));

Review Comment:
   The task still reads the destination endpoint from 
ReplicatorConnectorConfig.DEST_ENDPOINT, but ReplicatorSourceConnector now 
writes it under ConnectorConfig.RMQ_NAMESRVADDR. As a result, 
connectorConfig.getDestEndpoint() will be null in the task, which may break any 
logic that depends on the destination nameserver address.



##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/utils/ConnectUtil.java:
##########
@@ -111,21 +109,49 @@ public static AllocateConnAndTaskStrategy 
initAllocateConnAndTaskStrategy(Worker
         }

Review Comment:
   The new producer initialization overload that reads connector-level 
ACL/namesrv/group settings is not covered by any visible test changes. Consider 
adding unit tests for both the use.namesrv.of.connector=true and false 
branches, including cases where keys are missing.



##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/config/ConnectorConfig.java:
##########
@@ -67,6 +67,16 @@ public class ConnectorConfig {
     public static final int ERRORS_RETRY_MAX_DELAY_DEFAULT = 60000;
     public static final String ERRORS_TOLERANCE_CONFIG = "errors.tolerance";
     public static final ToleranceType ERRORS_TOLERANCE_DEFAULT = 
ToleranceType.NONE;
+    /**
+     * Use connector's namesrv address to create producer in `SourceTask`.
+     */
+    public final static String USE_NAMESRV_OF_CONNECTOR = 
"use.namesrv.of.connector";
+    public static final String RMQ_ACL_ENABLE = "rmq.acl.enable";
+    public static final String RMQ_ACCESS_KEY = "rmq.access.key";

Review Comment:
   RMQ_SECRET_KEY is defined as "rmq.secret_key" (underscore separator) while 
RMQ_ACCESS_KEY uses "rmq.access.key" (dot separator). This inconsistency is 
likely a typo and can cause user-provided secret keys to be ignored if they 
follow the dotted naming pattern of the other rmq.* keys.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to