in timescaledb-connector/src/main/java/com/epam/deltix/timebase/connector/ApplicationEventHandler.java [103:115]
public void handleFailedReplicationEvent(FailedReplicationEvent event) {
String streamName = (String) event.getSource();
LOG.info().append("Received failed replication event for stream: ").append(streamName).commit();
StreamMetaData metaData = cacheService.get(streamName);
Integer failedAttempts = metaData.getFailedAttempts();
if (failedAttempts < retryAttempts) {
executor.execute(() -> replicationService.replicate(streamName));
} else {
LOG.error().append("Max replication attempts reached for stream: ").append(streamName).commit();
}
}