File tree Expand file tree Collapse file tree
metadata-service/src/main/java/com/dbsyncer/metadata/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .dbsyncer .metadata .config ;
2+
3+ import com .dbsyncer .connectors .client .KafkaConnectClient ;
4+ import org .springframework .context .annotation .Bean ;
5+ import org .springframework .context .annotation .Configuration ;
6+
7+ @ Configuration
8+ public class ConnectClientConfiguration {
9+
10+ @ Bean (destroyMethod = "close" )
11+ public KafkaConnectClient kafkaConnectClient (ConnectProperties props ) {
12+ return new KafkaConnectClient (props .getRestUrl ());
13+ }
14+ }
15+
Original file line number Diff line number Diff line change 1+ package com .dbsyncer .metadata .config ;
2+
3+ import lombok .Getter ;
4+ import lombok .Setter ;
5+ import org .springframework .boot .context .properties .ConfigurationProperties ;
6+ import org .springframework .context .annotation .Configuration ;
7+
8+ @ Configuration
9+ @ ConfigurationProperties (prefix = "connect" )
10+ @ Getter
11+ @ Setter
12+ public class ConnectProperties {
13+ private String restUrl ;
14+ private long waitTimeoutMs = 60000 ;
15+ private long pollIntervalMs = 2000 ;
16+ }
17+
You can’t perform that action at this time.
0 commit comments