DBZ-1214 Applying default status update interval

This commit is contained in:
Gunnar Morling 2019-05-02 09:58:36 +02:00 committed by Jiri Pechanec
parent 6960c880ca
commit d12926c404
2 changed files with 3 additions and 0 deletions

View File

@ -764,6 +764,7 @@ public static SchemaRefreshMode parse(String value) {
public static final Field STATUS_UPDATE_INTERVAL_MS = Field.create("status.update.interval.ms")
.withDisplayName("Status update interval (ms)")
.withType(Type.INT) // Postgres doesn't accept long for this value
.withDefault(10_000)
.withWidth(Width.SHORT)
.withImportance(Importance.MEDIUM)
.withDescription("Frequency in milliseconds for sending replication connection status updates to the server. Defaults to 10 seconds (10000 ms).")

View File

@ -14,6 +14,7 @@
import java.nio.file.Paths;
import java.sql.Connection;
import java.sql.SQLException;
import java.time.Duration;
import java.util.Set;
import java.util.stream.Collectors;
@ -75,6 +76,7 @@ public static ReplicationConnection createForReplication(String slotName, boolea
.withSlot(slotName)
.withTypeRegistry(getTypeRegistry())
.dropSlotOnClose(dropOnClose)
.statusUpdateInterval(Duration.ofSeconds(10))
.build();
}