class ProducerSettings[K, V] extends AnyRef
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.
- Source
- ProducerSettings.scala
- Alphabetic
- By Inheritance
- ProducerSettings
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ProducerSettings(properties: Map[String, String], keySerializerOpt: Option[Serializer[K]], valueSerializerOpt: Option[Serializer[V]], closeTimeout: FiniteDuration, parallelism: Int, dispatcher: String, eosCommitInterval: FiniteDuration)
- Annotations
- @deprecated
- Deprecated
(Since version 1.0-M1) use the factory methods
ProducerSettings.apply
andcreate
instead
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val closeTimeout: FiniteDuration
- def createKafkaProducer(): Producer[K, V]
Create a
Producer
instance from the settings. - val dispatcher: String
- val eosCommitInterval: FiniteDuration
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getProperties: Map[String, AnyRef]
Get the Kafka producer settings as map.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val keySerializerOpt: Option[Serializer[K]]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val parallelism: Int
- val producerFactory: (ProducerSettings[K, V]) => Producer[K, V]
- val properties: Map[String, String]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- ProducerSettings → AnyRef → Any
- val valueSerializerOpt: Option[Serializer[V]]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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.
- def withCloseTimeout(closeTimeout: Duration): ProducerSettings[K, V]
Java API: Duration to wait for
KafkaConsumer.close
to finish. - def withCloseTimeout(closeTimeout: FiniteDuration): ProducerSettings[K, V]
Duration to wait for
KafkaConsumer.close
to finish. - def withDispatcher(dispatcher: String): ProducerSettings[K, V]
Fully qualified config path which holds the dispatcher configuration to be used by the producer stages.
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.
- def withEosCommitInterval(eosCommitInterval: Duration): ProducerSettings[K, V]
Java API: The time interval to commit a transaction when using the
Transactional.sink
orTransactional.flow
. - def withEosCommitInterval(eosCommitInterval: FiniteDuration): ProducerSettings[K, V]
The time interval to commit a transaction when using the
Transactional.sink
orTransactional.flow
. - def withParallelism(parallelism: Int): ProducerSettings[K, V]
Tuning parameter of how many sends that can run in parallel.
- def withProducerFactory(factory: (ProducerSettings[K, V]) => Producer[K, V]): ProducerSettings[K, V]
Replaces the default Kafka producer creation logic.
- 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.
- 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.
- 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.
- 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.