final class RichKafkaConsumer[K, V] extends AutoCloseable with StrictLogging
A means of driving a kafka-stream using the consumer (not kafka streaming) API
- Alphabetic
- By Inheritance
- RichKafkaConsumer
- StrictLogging
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RichKafkaConsumer(consumer: KafkaConsumer[K, V], topics: Set[String], defaultPollTimeout: Duration)
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
asObservable(closeOnComplete: Boolean)(implicit scheduler: Scheduler): Observable[ConsumerRecord[K, V]]
Represent this consumer as an observable
Represent this consumer as an observable
- closeOnComplete
set to true if the underlying Kafka consumer should be closed when this observable completes
-
def
asObservableCommitEvery(closeOnComplete: Boolean, numberOfMessagesToReceiveBetweenOffsetCommits: Int)(implicit scheduler: Scheduler): Observable[ConsumerRecord[K, V]]
- closeOnComplete
a flag indicating that this consumer should be closed when this observable is
- numberOfMessagesToReceiveBetweenOffsetCommits
the number of messages which will be received before we commit our offsets
- returns
an observable which will commit the offsets every n messages
-
def
asObservableCommitEveryObservable(closeOnComplete: Boolean, numberOfMessagesToReceiveBetweenOffsetCommits: Int)(implicit scheduler: Scheduler): Observable[(PartitionOffsetState, Option[Future[Unit]], ConsumerRecord[K, V])]
- closeOnComplete
a flag indicating that this consumer should be closed when this observable is
- numberOfMessagesToReceiveBetweenOffsetCommits
the number of messages which will be received before we commit our offsets
- returns
an observable which will commit the offsets every n messages
- def assignmentPartitions: List[Int]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
close(): Unit
- Definition Classes
- RichKafkaConsumer → AutoCloseable
-
def
commitAsync(state: PartitionOffsetState): Future[Map[TopicPartition, OffsetAndMetadata]]
- state
the state to commit
- returns
a future of the commit result
- def committed(partition: Int): Map[String, OffsetAndMetadata]
- val consumer: KafkaConsumer[K, V]
- val defaultPollTimeout: Duration
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isClosed(): Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
logger: Logger
- Attributes
- protected
- Definition Classes
- StrictLogging
-
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 partitions: List[PartitionInfo]
- def partitionsByTopic(): Map[Key, List[PartitionInfo]]
-
def
poll(timeout: Duration = javaPollDuration): Iterable[ConsumerRecord[K, V]]
poll for records
poll for records
- timeout
the poll timeout
- returns
the records returned from the poll
- def positionsFor(partition: Int): Map[String, Long]
- def seekToBeginning(partition: Int): Boolean
- def status(verbose: Boolean): String
- def subscribe(topic: String, listener: ConsumerRebalanceListener = RebalanceListener): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- val topics: Set[String]
-
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()