Record Class KafkaConsumerConfig

java.lang.Object
java.lang.Record
ru.tinkoff.kora.kafka.common.config.KafkaConsumerConfig

public record KafkaConsumerConfig(Properties driverProperties, @Nullable List<String> topics, @Nullable Pattern topicsPattern, @Nullable List<String> partitions, ru.tinkoff.kora.common.util.Either<Duration,String> offset, Duration pollTimeout, Duration backoffTimeout, int threads) extends Record
  • Constructor Details

    • KafkaConsumerConfig

      public KafkaConsumerConfig(Properties driverProperties, @Nullable List<String> topics, @Nullable Pattern topicsPattern, @Nullable List<String> partitions, @Nullable ru.tinkoff.kora.common.util.Either<Duration,String> offset, @Nullable Duration pollTimeout, @Nullable Duration backoffTimeout, @Nullable Integer threads)
    • KafkaConsumerConfig

      public KafkaConsumerConfig(Properties driverProperties, @Nullable List<String> topics, @Nullable Pattern topicsPattern, @Nullable List<String> partitions, ru.tinkoff.kora.common.util.Either<Duration,String> offset, Duration pollTimeout, Duration backoffTimeout, int threads)
      Creates an instance of a KafkaConsumerConfig record class.
      Parameters:
      driverProperties - the value for the driverProperties record component
      topics - the value for the topics record component
      topicsPattern - the value for the topicsPattern record component
      partitions - the value for the partitions record component
      offset - the value for the offset record component
      pollTimeout - the value for the pollTimeout record component
      backoffTimeout - the value for the backoffTimeout record component
      threads - the value for the threads record component
  • Method Details

    • withDriverPropertiesOverrides

      public KafkaConsumerConfig withDriverPropertiesOverrides(Map<String,Object> overrides)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • driverProperties

      public Properties driverProperties()
      Returns the value of the driverProperties record component.
      Returns:
      the value of the driverProperties record component
    • topics

      @Nullable public List<String> topics()
      Returns the value of the topics record component.
      Returns:
      the value of the topics record component
    • topicsPattern

      @Nullable public Pattern topicsPattern()
      Returns the value of the topicsPattern record component.
      Returns:
      the value of the topicsPattern record component
    • partitions

      @Nullable public List<String> partitions()
      Returns the value of the partitions record component.
      Returns:
      the value of the partitions record component
    • offset

      public ru.tinkoff.kora.common.util.Either<Duration,String> offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • pollTimeout

      public Duration pollTimeout()
      Returns the value of the pollTimeout record component.
      Returns:
      the value of the pollTimeout record component
    • backoffTimeout

      public Duration backoffTimeout()
      Returns the value of the backoffTimeout record component.
      Returns:
      the value of the backoffTimeout record component
    • threads

      public int threads()
      Returns the value of the threads record component.
      Returns:
      the value of the threads record component