Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The current Kafka architecture lacks a built-in mechanism to directly track the replication offset lag, i.e the number of to-be-replicated records. This could be essential for monitoring and maintaining the health and performance of data replication processes. The replication offset lag, defined as the difference between the last end offset of the source partition (LEO) and the last replicated source offset (LRO), is beneficial for understanding the progress and potential bottlenecks in data replication scenarios.

Public Interfaces

Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.

A public interface is any change to the following:

  • org/apache/kafka/connect/mirror/MirrorMetrics - new metrics templates for max, min, avg and value replication-offset-lag

    Code Block
    languagejava
    titleMirrorMetrics.java
     replicationOffsetLag = new MetricNameTemplate(
    
     "replication-offset-lag", SOURCE_CONNECTOR_GROUP,
    
     "Count of records to be replicated from source to target cluster.", partitionTags);
    
     replicationOffsetLagMax = new MetricNameTemplate(
    
     "replication-offset-lag-max", SOURCE_CONNECTOR_GROUP,
    
     "Max count of records to be replicated from source to target cluster.", partitionTags);
    
     replicationOffsetLagMin = new MetricNameTemplate(
    
     "replication-offset-lag-min", SOURCE_CONNECTOR_GROUP,
    
     "Min count of records to be replicated from source to target cluster.", partitionTags);
    
     replicationOffsetLagAvg = new MetricNameTemplate(
    
     "replication-offset-lag-avg", SOURCE_CONNECTOR_GROUP,
    
     "Average count of records to be replicated from source to target cluster.", partitionTags)


...