azexcy commented on code in PR #28953:
URL: https://github.com/apache/shardingsphere/pull/28953#discussion_r1386052927


##########
kernel/data-pipeline/scenario/cdc/client/src/test/java/org/apache/shardingsphere/data/pipeline/cdc/client/example/Bootstrap.java:
##########
@@ -41,14 +42,14 @@ public static void main(final String[] args) {
         // Pay attention to the time zone, to avoid the problem of incorrect 
time zone, it is best to ensure that the time zone of the program is consistent 
with the time zone of the database server
         // TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
         String address = "127.0.0.1";
-        CDCClientConfiguration clientConfig = new 
CDCClientConfiguration(address, 33071, records -> log.info("records: {}", 
records), new RetryStreamingExceptionHandler(3, 5000));
         int reconnectCount = 0;
         int maxReconnectCount = 5;
         while (reconnectCount < maxReconnectCount) {
-            try (CDCClient cdcClient = new CDCClient(clientConfig)) {
-                cdcClient.connect();
+            try (CDCClient cdcClient = new CDCClient(new 
CDCClientConfiguration(address, 33071, 5000))) {
+                LoggerExceptionErrorHandler loggerExceptionErrorHandler = new 
LoggerExceptionErrorHandler();
+                cdcClient.connect(records -> log.info("records: {}", records), 
new RetryStreamingExceptionHandler(cdcClient, 5, 5000), 
loggerExceptionErrorHandler);

Review Comment:
   Remove `reconnect` now, it's not generic logic



-- 
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