case class ConsumerOps[F[_], K, V](consumer: ConsumerApi[F, K, V]) extends Product with Serializable
- Alphabetic
- By Inheritance
- ConsumerOps
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ConsumerOps(consumer: ConsumerApi[F, K, V])
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 assign(topic: String, offsets: Map[TopicPartition, Long])(implicit F: Monad[F]): F[Unit]
- def assign(topics: List[String], offsets: Map[TopicPartition, Long], seekTo: SeekTo = SeekToBeginning)(implicit F: Monad[F]): F[Unit]
- def assignmentLastOffsets(commitMarkerAdjustment: Boolean = false)(implicit F: Monad[F]): F[Map[TopicPartition, Long]]
- def assignmentPositions(implicit F: Monad[F]): F[Map[TopicPartition, Long]]
- def assignmentPositionsAtLeast(offsets: Map[TopicPartition, Long])(implicit F: Monad[F]): F[Boolean]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def closeAndRecoverConcurrentModificationWithWakeup(timeout: FiniteDuration)(implicit F: ApplicativeError[F, Throwable]): F[Unit]
- def closeAndRecoverConcurrentModificationWithWakeup(implicit F: ApplicativeError[F, Throwable]): F[Unit]
- def commitSink: Pipe[F, Map[TopicPartition, OffsetAndMetadata], Unit]
Returns a sink that synchronously commits received offsets.
- val consumer: ConsumerApi[F, K, V]
- def createCaughtUpSignal(commitMarkerAdjustment: Boolean = false)(implicit F: ConcurrentEffect[F]): F[(Signal[F, Boolean], (ConsumerRecord[K, V]) => F[Unit])]
- def createCaughtUpSignal(lastOffsets: Map[TopicPartition, Long])(implicit F: Concurrent[F]): F[(Signal[F, Boolean], (ConsumerRecord[K, V]) => F[Unit])]
- 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[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lastOffsets(partitions: Iterable[TopicPartition], commitMarkerAdjustment: Boolean = false)(implicit F: Functor[F]): F[Map[TopicPartition, Long]]
- def log[G[_]](implicit arg0: Sync[G]): SelfAwareStructuredLogger[[_]G[_]]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def partitionsFor(topics: List[String])(implicit F: Applicative[F]): F[List[PartitionInfo]]
- def pollAndRecoverWakeupWithClose(timeout: FiniteDuration)(implicit F: ApplicativeError[F, Throwable]): F[ConsumerRecords[K, V]]
- def pollAndRecoverWakeupWithNone(timeout: FiniteDuration)(implicit F: ApplicativeError[F, Throwable]): F[Option[ConsumerRecords[K, V]]]
- def positions[G[_]](partitions: G[TopicPartition])(implicit arg0: Traverse[G], F: Applicative[F]): F[G[(TopicPartition, Long)]]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def readProcessCommit[A](pollTimeout: FiniteDuration)(process: (ConsumerRecord[K, V]) => F[A])(implicit F: ApplicativeError[F, Throwable]): Stream[F, A]
Returns a stream that processes records using the specified function, committing offsets for successfully processed records.
Returns a stream that processes records using the specified function, committing offsets for successfully processed records. If the processing function returns a failure, the stream will halt with that failure, and the record's offset will not be committed. This is still at-least-once processing, but records for which the function returns success (and offset commit succeeds) will not be reprocessed after a subsequent failure; only records for which the function returns failure, or offset commits fail, will be reprocessed. In some use cases this pattern is more appropriate than just using auto-offset-commits, since it will not commit offsets for failed records when the consumer is closed, and will likely result in less reprocessing after a failure. The consumer must be configured to disable offset auto-commits.
- def recordStream(pollTimeout: FiniteDuration): Stream[F, ConsumerRecord[K, V]]
Calls poll repeatedly, producing a chunk for each received collection of records.
- def recordsStream(pollTimeout: FiniteDuration): Stream[F, ConsumerRecords[K, V]]
Calls poll repeatedly, each stream element is the entire collection of received records.
- def recordsThroughAssignmentLastOffsets(timeout: FiniteDuration, commitMarkerAdjustment: Boolean = false)(implicit F: MonadError[F, Throwable]): Stream[F, ConsumerRecords[K, V]]
- def recordsThroughAssignmentLastOffsetsOrZeros(pollTimeout: FiniteDuration, maxZeroCount: Int, commitMarkerAdjustment: Boolean = false)(implicit F: MonadError[F, Throwable]): Stream[F, ConsumerRecords[K, V]]
- def recordsThroughOffsets(finalOffsets: Map[TopicPartition, Long], timeout: FiniteDuration)(implicit F: MonadError[F, Throwable]): Stream[F, ConsumerRecords[K, V]]
Polls for and returns records until reading at least up to the specified final offsets.
Polls for and returns records until reading at least up to the specified final offsets. After the returned stream halts, records will have been returned at least up to, and possibly after, the specified final offsets. The stream will not halt until reaching (at least) the specified offsets. The consumer is not modified, other then calling poll. The consumer should be assigned/subscribed, and seeked to appropriate initial positions, before calling this function. After this stream halts, the consumer may still be used. The next records polled will follow all of the records returned by this stream. One common use of this stream is to initially "catch up" to the last offsets of all assigned topic partitions during program initialization, before doing other things.
- def recordsThroughOffsetsOrZeros(finalOffsets: Map[TopicPartition, Long], pollTimeout: FiniteDuration, maxZeroCount: Int)(implicit F: MonadError[F, Throwable]): Stream[F, ConsumerRecords[K, V]]
- def subscribe(topics: String*): F[Unit]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()