Class ShardKey.KeyOrderedKey

java.lang.Object
io.confluent.parallelconsumer.state.ShardKey
io.confluent.parallelconsumer.state.ShardKey.KeyOrderedKey
Enclosing class:
ShardKey

public static final class ShardKey.KeyOrderedKey extends ShardKey
  • Constructor Details

    • KeyOrderedKey

      public KeyOrderedKey(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> rec)
    • KeyOrderedKey

      public KeyOrderedKey(org.apache.kafka.common.TopicPartition topicName, Object key)
  • Method Details

    • getTopicName

      public org.apache.kafka.common.TopicPartition getTopicName()
      Note: We use just the topic name here, and not the partition, so that if we were to receive records from the same key from the partitions we're assigned, they will be put into the same queue.
    • getKey

      public Object getKey()
      The key of the record being referenced. Nullable if record is produced with a null key.
    • toString

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

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

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class ShardKey
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ShardKey