ConsumerSettings

akka.kafka.ConsumerSettings
See theConsumerSettings companion object
class ConsumerSettings[K, V]

Settings for consumers. See akka.kafka.consumer section in reference.conf. Note that the companion object provides apply and create functions for convenient construction of the settings, together with the with methods.

The constructor is Internal API.

Attributes

Companion:
object
Source:
ConsumerSettings.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

Create a Kafka Consumer instance from these settings.

Create a Kafka Consumer instance from these settings.

This will fail with IllegalStateException if asynchronous enrichment is set up -- always prefer createKafkaConsumerAsync or createKafkaConsumerCompletionStage.

Attributes

Throws:
IllegalStateException

if asynchronous enrichment is set via withEnrichAsync or withEnrichCompletionStage, you must use createKafkaConsumerAsync or createKafkaConsumerCompletionStage to apply it

Source:
ConsumerSettings.scala
def createKafkaConsumerAsync()(implicit executionContext: ExecutionContext): Future[Consumer[K, V]]

Scala API.

Scala API.

Create a Kafka Consumer instance from these settings (without blocking for enriched).

Attributes

Source:
ConsumerSettings.scala

Java API.

Java API.

Create a Kafka Consumer instance from these settings (without blocking for enriched).

Attributes

Source:
ConsumerSettings.scala

Applies enrichAsync to complement these settings from asynchronous sources.

Applies enrichAsync to complement these settings from asynchronous sources.

Attributes

Source:
ConsumerSettings.scala
def getProperties: Map[String, AnyRef]

Get the Kafka consumer settings as map.

Get the Kafka consumer settings as map.

Attributes

Source:
ConsumerSettings.scala

Java API: Get a raw property. null if it is not defined.

Java API: Get a raw property. null if it is not defined.

Attributes

Source:
ConsumerSettings.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Any
Source:
ConsumerSettings.scala
def withBootstrapServers(bootstrapServers: String): ConsumerSettings[K, V]

A comma-separated list of host/port pairs to use for establishing the initial connection to the Kafka cluster.

A comma-separated list of host/port pairs to use for establishing the initial connection to the Kafka cluster.

Attributes

Source:
ConsumerSettings.scala
def withClientId(clientId: String): ConsumerSettings[K, V]

An id string to pass to the server when making requests. The purpose of this is to be able to track the source of requests beyond just ip/port by allowing a logical application name to be included in server-side request logging.

An id string to pass to the server when making requests. The purpose of this is to be able to track the source of requests beyond just ip/port by allowing a logical application name to be included in server-side request logging.

Attributes

Source:
ConsumerSettings.scala

Set duration to wait for KafkaConsumer.close to finish.

Set duration to wait for KafkaConsumer.close to finish.

Attributes

Source:
ConsumerSettings.scala
def withCloseTimeout(closeTimeout: Duration): ConsumerSettings[K, V]

Java API: Set duration to wait for KafkaConsumer.close to finish.

Java API: Set duration to wait for KafkaConsumer.close to finish.

Attributes

Source:
ConsumerSettings.scala
def withCommitRefreshInterval(commitRefreshInterval: Duration): ConsumerSettings[K, V]

If set to a finite duration, the consumer will re-send the last committed offsets periodically for all assigned partitions.

If set to a finite duration, the consumer will re-send the last committed offsets periodically for all assigned partitions.

Attributes

See also:
Source:
ConsumerSettings.scala
def withCommitRefreshInterval(commitRefreshInterval: Duration): ConsumerSettings[K, V]

Java API: If set to a finite duration, the consumer will re-send the last committed offsets periodically for all assigned partitions. @see https://issues.apache.org/jira/browse/KAFKA-4682 Set to java.time.Duration.ZERO to switch it off.

Java API: If set to a finite duration, the consumer will re-send the last committed offsets periodically for all assigned partitions. @see https://issues.apache.org/jira/browse/KAFKA-4682 Set to java.time.Duration.ZERO to switch it off.

Attributes

See also:
Source:
ConsumerSettings.scala

If offset commit requests are not completed within this timeout the returned Future is completed with akka.kafka.CommitTimeoutException.

If offset commit requests are not completed within this timeout the returned Future is completed with akka.kafka.CommitTimeoutException.

Attributes

Source:
ConsumerSettings.scala
def withCommitTimeout(commitTimeout: Duration): ConsumerSettings[K, V]

Java API: If offset commit requests are not completed within this timeout the returned Future is completed with akka.kafka.CommitTimeoutException.

Java API: If offset commit requests are not completed within this timeout the returned Future is completed with akka.kafka.CommitTimeoutException.

Attributes

Source:
ConsumerSettings.scala
def withCommitWarning(commitTimeWarning: FiniteDuration): ConsumerSettings[K, V]

If commits take longer than this time a warning is logged

If commits take longer than this time a warning is logged

Attributes

Source:
ConsumerSettings.scala
def withCommitWarning(commitTimeWarning: Duration): ConsumerSettings[K, V]

Java API: If commits take longer than this time a warning is logged

Java API: If commits take longer than this time a warning is logged

Attributes

Source:
ConsumerSettings.scala
def withConnectionChecker(kafkaConnectionCheckerConfig: ConnectionCheckerSettings): ConsumerSettings[K, V]

Enable kafka connection checker with provided settings

Enable kafka connection checker with provided settings

Attributes

Source:
ConsumerSettings.scala

Replaces the default Kafka consumer creation logic.

Replaces the default Kafka consumer creation logic.

Attributes

Source:
ConsumerSettings.scala
def withDispatcher(dispatcher: String): ConsumerSettings[K, V]

Fully qualified config path which holds the dispatcher configuration to be used by the akka.kafka.KafkaConsumerActor. Some blocking may occur.

Fully qualified config path which holds the dispatcher configuration to be used by the akka.kafka.KafkaConsumerActor. Some blocking may occur.

Attributes

Source:
ConsumerSettings.scala
def withDrainingCheckInterval(drainingCheckInterval: FiniteDuration): ConsumerSettings[K, V]

Scala API: Check interval for TransactionalProducer when finishing transaction before shutting down consumer

Scala API: Check interval for TransactionalProducer when finishing transaction before shutting down consumer

Attributes

Source:
ConsumerSettings.scala
def withDrainingCheckInterval(drainingCheckInterval: Duration): ConsumerSettings[K, V]

Java API: Check interval for TransactionalProducer when finishing transaction before shutting down consumer

Java API: Check interval for TransactionalProducer when finishing transaction before shutting down consumer

Attributes

Source:
ConsumerSettings.scala

Scala API. A hook to allow for resolving some settings asynchronously.

Scala API. A hook to allow for resolving some settings asynchronously.

Attributes

Since:

2.0.0

Source:
ConsumerSettings.scala

Java API. A hook to allow for resolving some settings asynchronously.

Java API. A hook to allow for resolving some settings asynchronously.

Attributes

Since:

2.0.0

Source:
ConsumerSettings.scala
def withGroupId(groupId: String): ConsumerSettings[K, V]

A unique string that identifies the consumer group this consumer belongs to.

A unique string that identifies the consumer group this consumer belongs to.

Attributes

Source:
ConsumerSettings.scala
def withGroupInstanceId(groupInstanceId: String): ConsumerSettings[K, V]

An id string that marks consumer as a unique static member of the consumer group.

An id string that marks consumer as a unique static member of the consumer group.

Attributes

Source:
ConsumerSettings.scala
def withMetadataRequestTimeout(metadataRequestTimeout: FiniteDuration): ConsumerSettings[K, V]

Scala API

Scala API

Attributes

Source:
ConsumerSettings.scala
def withMetadataRequestTimeout(metadataRequestTimeout: Duration): ConsumerSettings[K, V]

Java API

Java API

Attributes

Source:
ConsumerSettings.scala
def withOffsetForTimesTimeout(offsetForTimesTimeout: FiniteDuration): ConsumerSettings[K, V]

Scala API: Limits the blocking on Kafka consumer offsetForTimes calls.

Scala API: Limits the blocking on Kafka consumer offsetForTimes calls.

Attributes

Source:
ConsumerSettings.scala
def withOffsetForTimesTimeout(offsetForTimesTimeout: Duration): ConsumerSettings[K, V]

Java API: Limits the blocking on Kafka consumer offsetForTimes calls.

Java API: Limits the blocking on Kafka consumer offsetForTimes calls.

Attributes

Source:
ConsumerSettings.scala

A list of class names or class types, ordered by preference, of supported partition assignment strategies that the client will use to distribute partition ownership amongst consumer instances when group management is used.

A list of class names or class types, ordered by preference, of supported partition assignment strategies that the client will use to distribute partition ownership amongst consumer instances when group management is used.

See https://kafka.apache.org/documentation/#consumerconfigs_partition.assignment.strategy

Attributes

Source:
ConsumerSettings.scala
def withPartitionHandlerWarning(partitionHandlerWarning: FiniteDuration): ConsumerSettings[K, V]

Scala API

Scala API

Attributes

Source:
ConsumerSettings.scala
def withPartitionHandlerWarning(partitionHandlerWarning: Duration): ConsumerSettings[K, V]

Java API

Java API

Attributes

Source:
ConsumerSettings.scala

Set the interval from one scheduled poll to the next.

Set the interval from one scheduled poll to the next.

Attributes

Source:
ConsumerSettings.scala
def withPollInterval(pollInterval: Duration): ConsumerSettings[K, V]

Java API: Set the interval from one scheduled poll to the next.

Java API: Set the interval from one scheduled poll to the next.

Attributes

Source:
ConsumerSettings.scala

Set the maximum duration a poll to the Kafka broker is allowed to take.

Set the maximum duration a poll to the Kafka broker is allowed to take.

Attributes

Source:
ConsumerSettings.scala
def withPollTimeout(pollTimeout: Duration): ConsumerSettings[K, V]

Java API: Set the maximum duration a poll to the Kafka broker is allowed to take.

Java API: Set the maximum duration a poll to the Kafka broker is allowed to take.

Attributes

Source:
ConsumerSettings.scala

Scala API: Limits the blocking on Kafka consumer position calls.

Scala API: Limits the blocking on Kafka consumer position calls.

Attributes

Source:
ConsumerSettings.scala
def withPositionTimeout(positionTimeout: Duration): ConsumerSettings[K, V]

Java API: Limits the blocking on Kafka consumer position calls.

Java API: Limits the blocking on Kafka consumer position calls.

Attributes

Source:
ConsumerSettings.scala
def withProperties(properties: Map[String, String]): ConsumerSettings[K, V]

Scala API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

Scala API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

Attributes

Source:
ConsumerSettings.scala
def withProperties(properties: (String, String)*): ConsumerSettings[K, V]

Scala API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

Scala API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

Attributes

Source:
ConsumerSettings.scala
def withProperties(properties: Map[String, String]): ConsumerSettings[K, V]

Java API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

Java API: The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

Attributes

Source:
ConsumerSettings.scala
def withProperty(key: String, value: String): ConsumerSettings[K, V]

The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

The raw properties of the kafka-clients driver, see constants in org.apache.kafka.clients.consumer.ConsumerConfig.

Attributes

Source:
ConsumerSettings.scala

Set the protection for unintentional offset reset.

Set the protection for unintentional offset reset.

Attributes

Source:
ConsumerSettings.scala

The stage will await outstanding offset commit requests before shutting down, but if that takes longer than this timeout it will stop forcefully.

The stage will await outstanding offset commit requests before shutting down, but if that takes longer than this timeout it will stop forcefully.

Attributes

Source:
ConsumerSettings.scala
def withStopTimeout(stopTimeout: Duration): ConsumerSettings[K, V]

Java API: The stage will await outstanding offset commit requests before shutting down, but if that takes longer than this timeout it will stop forcefully.

Java API: The stage will await outstanding offset commit requests before shutting down, but if that takes longer than this timeout it will stop forcefully.

Attributes

Source:
ConsumerSettings.scala

Time to wait for pending requests when a partition is closed.

Time to wait for pending requests when a partition is closed.

Attributes

Source:
ConsumerSettings.scala
def withWaitClosePartition(waitClosePartition: Duration): ConsumerSettings[K, V]

Java API: Time to wait for pending requests when a partition is closed.

Java API: Time to wait for pending requests when a partition is closed.

Attributes

Source:
ConsumerSettings.scala

Concrete fields