emptyOVO commented on code in PR #11084: URL: https://github.com/apache/inlong/pull/11084#discussion_r1756115922
########## inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/RedisSource.java: ########## @@ -84,6 +321,272 @@ public boolean sourceFinish() { @Override public boolean sourceExist() { - return false; + return true; + } + + private String getRedisUri() { + StringBuffer sb = new StringBuffer("redis://"); + sb.append(hostName).append(":").append(port); + if (!StringUtils.isEmpty(dbNumber)) { + sb.append("/").append(dbNumber); + } + sb.append("?"); + if (!StringUtils.isEmpty(authPassword)) { + sb.append("authPassword=").append(authPassword).append("&"); + } + if (!StringUtils.isEmpty(authUser)) { + sb.append("authUser=").append(authUser).append("&"); + } + if (!StringUtils.isEmpty(readTimeout)) { + sb.append("readTimeout=").append(readTimeout).append("&"); + } + if (ssl) { + sb.append("ssl=").append("yes").append("&"); + } + if (!StringUtils.isEmpty(snapShot)) { + sb.append("replOffset=").append(snapShot).append("&"); + } + if (!StringUtils.isEmpty(replId)) { + sb.append("replId=").append(replId).append("&"); + } + if (sb.charAt(sb.length() - 1) == '?' || sb.charAt(sb.length() - 1) == '&') { + sb.deleteCharAt(sb.length() - 1); + } + return sb.toString(); + } + + private void initReplicator() { + DefaultCommandParser defaultCommandParser = new DefaultCommandParser(); + this.redisReplicator.addCommandParser(CommandName.name("APPEND"), defaultCommandParser); Review Comment: In theory, yes, but I think that since the user is using a subscription model, they should be more sensitive to real-time changes in the data, so I have all the Key modification commands listened in here, Do i need to change this ? -- 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...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org