trait KafkaConsumerLifecycle[F[_]] extends AnyRef
- Alphabetic
- By Inheritance
- KafkaConsumerLifecycle
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def fiber: Fiber[F, Unit]
A
Fiberthat can be used to cancel the underlying consumer, or wait for it to complete.A
Fiberthat can be used to cancel the underlying consumer, or wait for it to complete. If you're usingKafkaConsumer.stream, or any other provided stream in KafkaConsumer, these will be automatically interrupted when the underlying consumer has been cancelled or when it finishes with an exception.
Whenevercancelis invoked, an attempt will be made to stop the underlying consumer. Thecanceloperation will not wait for the consumer to shutdown. If you also want to wait for the shutdown to complete, you can usejoin. Note thatjoinis guaranteed to complete after consumer shutdown, even when the consumer is cancelled withcancel.
ThisFiberinstance is usually only required if the consumer needs to be cancelled due to some external condition, or when an external process needs to be cancelled whenever the consumer has shut down. Most of the time, when you're only using the streams provided by KafkaConsumer, there is no need to use this.- Annotations
- @deprecated
- Deprecated
(Since version 1.4.0) Use terminate/awaitTermination instead
Concrete 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 awaitTermination: F[Unit]
Wait for consumer to shut down.
Wait for consumer to shut down. Note that
awaitTerminationis guaranteed to complete after consumer shutdown, even when the consumer is cancelled withterminate.This method will not initiate shutdown. To initiate shutdown and wait for it to complete, you can use
terminate >> awaitTermination.- Annotations
- @nowarn()
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def terminate: F[Unit]
Whenever
terminateis invoked, an attempt will be made to stop the underlying consumer.Whenever
terminateis invoked, an attempt will be made to stop the underlying consumer. Theterminateoperation will not wait for the consumer to shutdown. If you also want to wait for the shutdown to complete, you can useterminate >> awaitTermination.
- Annotations
- @nowarn()
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()