Consumes the first message available in a given topic, deserializing it as type V).
Consumes the first message available in a given topic, deserializing it as type V).
Only the message that is returned is committed if autoCommit is false. If autoCommit is true then all messages that were polled will be committed.
the topic to consume a message from
if false, only the offset for the consumed message will be committed. if true, the offset for the last polled message will be committed instead. Defaulted to false.
an implicit EmbeddedKafkaConfig
an implicit org.apache.kafka.common.serialization.Deserializer for the type K
an implicit org.apache.kafka.common.serialization.Deserializer for the type V
the first message consumed from the given topic, with a type V)
KafkaUnavailableException
if unable to connect to Kafka
TimeoutException
if unable to consume a message within 5 seconds
Consumes the first message available in a given topic, deserializing it as type V.
Consumes the first message available in a given topic, deserializing it as type V.
Only the message that is returned is committed if autoCommit is false. If autoCommit is true then all messages that were polled will be committed.
the topic to consume a message from
if false, only the offset for the consumed message will be committed. if true, the offset for the last polled message will be committed instead. Defaulted to false.
an implicit EmbeddedKafkaConfig
an implicit org.apache.kafka.common.serialization.Deserializer for the type V
the first message consumed from the given topic, with a type V
KafkaUnavailableException
if unable to connect to Kafka
TimeoutException
if unable to consume a message within 5 seconds
Consumes the first n messages available in given topics, deserializes them as type V), and returns the n messages in a Map from topic name to List[(K, V)].
Consumes the first n messages available in given topics, deserializes them as type V), and returns the n messages in a Map from topic name to List[(K, V)].
Only the messages that are returned are committed if autoCommit is false. If autoCommit is true then all messages that were polled will be committed.
the topics to consume messages from
the number of messages to consume in a batch
if false, only the offset for the consumed messages will be committed. if true, the offset for the last polled message will be committed instead. Defaulted to false.
the interval to wait for messages before throwing TimeoutException
when true, throw TimeoutException if we have a silent period (no incoming messages) for the timeout interval; when false, throw TimeoutException after the timeout interval if we haven't received all of the expected messages
an implicit EmbeddedKafkaConfig
an implicit org.apache.kafka.common.serialization.Deserializer for the type K
an implicit org.apache.kafka.common.serialization.Deserializer for the type V
the List of messages consumed from the given topics, each with a type V)
KafkaUnavailableException
if unable to connect to Kafka
TimeoutException
if unable to consume messages within specified timeout
Consumes the first n messages available in given topics, deserializes them as type V, and returns the n messages in a Map from topic name to List[V].
Consumes the first n messages available in given topics, deserializes them as type V, and returns the n messages in a Map from topic name to List[V].
Only the messages that are returned are committed if autoCommit is false. If autoCommit is true then all messages that were polled will be committed.
the topics to consume messages from
the number of messages to consume in a batch
if false, only the offset for the consumed messages will be committed. if true, the offset for the last polled message will be committed instead. Defaulted to false.
the interval to wait for messages before throwing TimeoutException
when true, throw TimeoutException if we have a silent period (no incoming messages) for the timeout interval; when false, throw TimeoutException after the timeout interval if we haven't received all of the expected messages
an implicit EmbeddedKafkaConfig
an implicit org.apache.kafka.common.serialization.Deserializer for the type V
the List of messages consumed from the given topics, each with a type V
KafkaUnavailableException
if unable to connect to Kafka
TimeoutException
if unable to consume messages within specified timeout
Trait for Consumer-related actions.
an EmbeddedKafkaConfig