abstract class BatchConsumer extends BaseThreadedConsumer
Consumer that will process messages in batch, with guaranteed at-least-once processing
- Alphabetic
- By Inheritance
- BatchConsumer
- BaseThreadedConsumer
- LazyLogging
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
BatchConsumer(consumers: Seq[Consumer[Array[Byte], Array[Byte]]], frequency: Duration)
- consumers
consumers
- frequency
poll frequency
Type Members
-
class
ConsumerCoordinator extends Runnable
Invokes a callback on a batch of messages and commits offsets
- class ConsumerRunnable extends Runnable
Abstract Value Members
-
abstract
def
consume(records: Seq[ConsumerRecord[Array[Byte], Array[Byte]]]): BatchResult
Consume a batch of records.
Consume a batch of records.
The response from this method will determine the continued processing of messages. If
Commitis returned, the batch is considered complete and won't be presented again. IfContinueis returned, the batch will be presented again in the future, and more messages will be read off the topic in the meantime. IfPauseis returned, the batch will be presented again in the future, but no more messages will be read off the topic in the meantime.This method should return in a reasonable amount of time. If too much time is spent processing messages, consumers may be considered inactive and be dropped from processing. See https://kafka.apache.org/26/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html
Note: if there is an error committing the batch or something else goes wrong, some messages may be repeated in a subsequent call, regardless of the response from this method
- records
records
- returns
commit, continue, or pause
- Attributes
- protected
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
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
close(): Unit
- Definition Classes
- BaseThreadedConsumer → Closeable → AutoCloseable
-
def
createConsumerRunnable(id: String, consumer: Consumer[Array[Byte], Array[Byte]], handler: ConsumerErrorHandler): Runnable
- Attributes
- protected
- Definition Classes
- BatchConsumer → BaseThreadedConsumer
-
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()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isOpen: Boolean
- Attributes
- protected
- Definition Classes
- BaseThreadedConsumer
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
-
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
startConsumers(handler: Option[ConsumerErrorHandler] = None): Unit
- Definition Classes
- BaseThreadedConsumer
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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()