final case class PartitionOffsetState(offsetByPartitionByTopic: Map[String, Map[Int, Long]] = Map.empty) extends Product with Serializable
an immutable means of tracking which offset/partitions have been observed
- Alphabetic
- By Inheritance
- PartitionOffsetState
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PartitionOffsetState(offsetByPartitionByTopic: Map[String, Map[Int, Long]] = Map.empty)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asTopicPartitionMap: Map[TopicPartition, OffsetAndMetadata]
- def asTopicPartitionMapJava: Map[TopicPartition, OffsetAndMetadata]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
incOffsets(): PartitionOffsetState
We typically keep a PartitionOffsetState updated with observed kafka ConsumerRecords.
We typically keep a PartitionOffsetState updated with observed kafka ConsumerRecords. A normal workflow periodically (or even every message) tells Kafka vai RichKafkaConsumer to commit based on RichKafkaConsumer.commitAsync.
If we passed in this last PartitionOffsetState observed and quit, then Kafka would return the same record we last observed (e.g. potentially an off-by-one error). If we have a system which is intolerable to processing duplicate messages, then we should really tell Kafka to commit the _next_ offset of the last message observed/processed
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmpty: Boolean
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val offsetByPartitionByTopic: Map[String, Map[Int, Long]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def update(topic: String, partition: Int, offset: Long): PartitionOffsetState
- def update(record: ConsumerRecord[_, _]): PartitionOffsetState
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()