You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/05/09 06:03:40 UTC
[GitHub] [rocketmq-connect] odbozhou commented on a diff in pull request #128: [ISSUE #127]when sync tag or key properties of message, remove the 'connect-ext-' prefix
odbozhou commented on code in PR #128:
URL: https://github.com/apache/rocketmq-connect/pull/128#discussion_r867655473
##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/WorkerSourceTask.java:
##########
@@ -351,7 +352,11 @@ private void putExtendMsgProperty(ConnectRecord sourceDataEntry, Message sourceM
return;
}
for (String key : keySet) {
- MessageAccessor.putProperty(sourceMessage, "connect-ext-" + key, extensionKeyValues.getString(key));
+ if (key.equals(MessageConst.PROPERTY_KEYS) || key.equals(MessageConst.PROPERTY_TAGS)) {
Review Comment:
imo, we should have a static list of properties and see if the key is included in this list instead of enumerating.
For example: final static whiteListKey = {tags, propertyKey}
whiteListKey.cotain(key)
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org