ProducerSettings

akka.kafka.ProducerSettings
See theProducerSettings companion object
class ProducerSettings[K, V]

Settings for producers. See akka.kafka.producer 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:
ProducerSettings.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

Create a Producer instance from these settings.

Create a Producer instance from these settings.

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

Attributes

Throws:
IllegalStateException

if asynchronous enrichment is set via withEnrichAsync or withEnrichCompletionStage, you must use createKafkaProducerAsync / createKafkaProducerCompletionStage to apply it

Source:
ProducerSettings.scala
def createKafkaProducerAsync()(implicit executionContext: ExecutionContext): Future[Producer[K, V]]

Scala API.

Scala API.

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

Attributes

Source:
ProducerSettings.scala

Java API.

Java API.

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

Attributes

executor

Executor for asynchronous producer creation

Source:
ProducerSettings.scala

Applies enrichAsync to complement these settings from asynchronous sources.

Applies enrichAsync to complement these settings from asynchronous sources.

Attributes

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

Get the Kafka producer settings as map.

Get the Kafka producer settings as map.

Attributes

Source:
ProducerSettings.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:
ProducerSettings.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:
ProducerSettings.scala
def withBootstrapServers(bootstrapServers: String): ProducerSettings[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:
ProducerSettings.scala
def withClientId(clientId: String): ProducerSettings[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:
ProducerSettings.scala
def withCloseProducerOnStop(closeProducerOnStop: Boolean): ProducerSettings[K, V]

Call KafkaProducer.close on the org.apache.kafka.clients.producer.KafkaProducer when the producer stage receives a shutdown signal.

Call KafkaProducer.close on the org.apache.kafka.clients.producer.KafkaProducer when the producer stage receives a shutdown signal.

Attributes

Source:
ProducerSettings.scala

Duration to wait for KafkaProducer.close to finish.

Duration to wait for KafkaProducer.close to finish.

Attributes

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

Java API: Duration to wait for KafkaProducer.close to finish.

Java API: Duration to wait for KafkaProducer.close to finish.

Attributes

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

Fully qualified config path which holds the dispatcher configuration to be used by the producer stages. Some blocking may occur. When this value is empty, the dispatcher configured for the stream will be used.

Fully qualified config path which holds the dispatcher configuration to be used by the producer stages. Some blocking may occur. When this value is empty, the dispatcher configured for the stream will be used.

Attributes

Source:
ProducerSettings.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:
ProducerSettings.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:
ProducerSettings.scala

The time interval to commit a transaction when using the Transactional.sink or Transactional.flow.

The time interval to commit a transaction when using the Transactional.sink or Transactional.flow.

Attributes

Source:
ProducerSettings.scala
def withEosCommitInterval(eosCommitInterval: Duration): ProducerSettings[K, V]

Java API: The time interval to commit a transaction when using the Transactional.sink or Transactional.flow.

Java API: The time interval to commit a transaction when using the Transactional.sink or Transactional.flow.

Attributes

Source:
ProducerSettings.scala
def withParallelism(parallelism: Int): ProducerSettings[K, V]

Tuning parameter of how many sends that can run in parallel.

Tuning parameter of how many sends that can run in parallel.

Attributes

Source:
ProducerSettings.scala
def withProducer(producer: Producer[K, V]): ProducerSettings[K, V]

Replaces the default Kafka producer creation logic with an external producer. This will also set closeProducerOnStop = false by default.

Replaces the default Kafka producer creation logic with an external producer. This will also set closeProducerOnStop = false by default.

Attributes

Source:
ProducerSettings.scala

Replaces the default Kafka producer creation logic.

Replaces the default Kafka producer creation logic.

Attributes

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

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

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

Attributes

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

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

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

Attributes

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

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

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

Attributes

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

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

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

Attributes

Source:
ProducerSettings.scala

Deprecated methods

Attributes

Deprecated
true
Source:
ProducerSettings.scala