Class NewMirrorTopic

java.lang.Object
org.apache.kafka.clients.admin.NewMirrorTopic

@Evolving public class NewMirrorTopic extends Object
Supplemental new topic data for creating a topic that is a mirror of another.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NewMirrorTopic(String linkName, String sourceTopic)
    Prepares a new topic that mirrors its data from a source topic, starting from the earliest available offsets of the partitions.
    NewMirrorTopic(String linkName, String sourceTopic, OffsetSpec startOffsetSpec)
    Prepares a new topic that mirrors its data from a source topic, starting from the offsets determined by the provided startOffsetSpec.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    The name of the cluster link over which the topic will mirror from.
    Deprecated.
    This method is being deprecated because mirrorTopic is not an accurate name to describe a method that returns the source topic's name.
    The name of the topic to be mirrored over the cluster link, i.e.
     
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NewMirrorTopic

      public NewMirrorTopic(String linkName, String sourceTopic)
      Prepares a new topic that mirrors its data from a source topic, starting from the earliest available offsets of the partitions.
      Parameters:
      linkName - the name of the cluster link over which the topic will mirror from
      sourceTopic - the name of the topic to be mirrored over the cluster link
    • NewMirrorTopic

      public NewMirrorTopic(String linkName, String sourceTopic, OffsetSpec startOffsetSpec)
      Prepares a new topic that mirrors its data from a source topic, starting from the offsets determined by the provided startOffsetSpec.
      Parameters:
      linkName - the name of the cluster link over which the topic will mirror from
      sourceTopic - the name of the topic to be mirrored over the cluster link
      startOffsetSpec - the offset spec used to determine the first offset from which each partition will be mirrored. By default, mirroring starts from the first available offset for each source partition. A start offset spec can be provided to start mirroring from the latest offset or offset with a specified timestamp.
  • Method Details

    • linkName

      public String linkName()
      The name of the cluster link over which the topic will mirror from.
    • mirrorTopic

      @Deprecated public String mirrorTopic()
      Deprecated.
      This method is being deprecated because mirrorTopic is not an accurate name to describe a method that returns the source topic's name.

      Use sourceTopic()} instead.

      The name of the topic to be mirrored over the cluster link, i.e. the source topic's name.
    • sourceTopic

      public String sourceTopic()
      The name of the topic to be mirrored over the cluster link, i.e. the source topic's name.
    • startOffsetSpec

      public OffsetSpec startOffsetSpec()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object