Class NoOffsetForPartitionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.kafka.common.KafkaException
-
- org.apache.kafka.clients.consumer.InvalidOffsetException
-
- org.apache.kafka.clients.consumer.NoOffsetForPartitionException
-
- All Implemented Interfaces:
java.io.Serializable
public class NoOffsetForPartitionException extends InvalidOffsetException
Indicates that there is no stored offset for a partition and no defined offset reset policy.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NoOffsetForPartitionException(java.util.Collection<TopicPartition> partitions)
NoOffsetForPartitionException(TopicPartition partition)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TopicPartition
partition()
Deprecated.please usepartitions
java.util.Set<TopicPartition>
partitions()
returns all partitions for which no offests are defined.
-
-
-
Constructor Detail
-
NoOffsetForPartitionException
public NoOffsetForPartitionException(TopicPartition partition)
-
NoOffsetForPartitionException
public NoOffsetForPartitionException(java.util.Collection<TopicPartition> partitions)
-
-
Method Detail
-
partition
@Deprecated public TopicPartition partition()
Deprecated.please usepartitions
returns the first partition (out ofpartitions
) for which no offset is defined.- Returns:
- a partition with no offset
-
partitions
public java.util.Set<TopicPartition> partitions()
returns all partitions for which no offests are defined.- Specified by:
partitions
in classInvalidOffsetException
- Returns:
- all partitions without offsets
-
-