Class/Object

akka.kafka

ProducerSettings

Related Docs: object ProducerSettings | package kafka

Permalink

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
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProducerSettings
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val closeProducerOnStop: Boolean

    Permalink
  7. val closeTimeout: FiniteDuration

    Permalink
  8. def createKafkaProducer(): Producer[K, V]

    Permalink

    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().

    Exceptions thrown

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

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

    Permalink

    Scala API.

    Scala API.

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

  10. def createKafkaProducerCompletionStage(executor: Executor): CompletionStage[Producer[K, V]]

    Permalink

    Java API.

    Java API.

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

    executor

    Executor for asynchronous producer creation

  11. val dispatcher: String

    Permalink
  12. val enrichAsync: Option[(ProducerSettings[K, V]) ⇒ Future[ProducerSettings[K, V]]]

    Permalink
  13. def enriched: Future[ProducerSettings[K, V]]

    Permalink

    Applies enrichAsync to complement these settings from asynchronous sources.

  14. val eosCommitInterval: FiniteDuration

    Permalink
  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getProperties: Map[String, AnyRef]

    Permalink

    Get the Kafka producer settings as map.

  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. val keySerializerOpt: Option[Serializer[K]]

    Permalink
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. val parallelism: Int

    Permalink
  27. val producerFactorySync: Option[(ProducerSettings[K, V]) ⇒ Producer[K, V]]

    Permalink
  28. val properties: Map[String, String]

    Permalink
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toString(): String

    Permalink
    Definition Classes
    ProducerSettings → AnyRef → Any
  31. val valueSerializerOpt: Option[Serializer[V]]

    Permalink
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def withBootstrapServers(bootstrapServers: String): ProducerSettings[K, V]

    Permalink

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

  36. def withCloseProducerOnStop(closeProducerOnStop: Boolean): ProducerSettings[K, V]

    Permalink

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

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

    Permalink

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

  38. def withCloseTimeout(closeTimeout: FiniteDuration): ProducerSettings[K, V]

    Permalink

    Duration to wait for KafkaProducer.close to finish.

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

    Permalink

    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.

  40. def withEnrichAsync(value: (ProducerSettings[K, V]) ⇒ Future[ProducerSettings[K, V]]): ProducerSettings[K, V]

    Permalink

    Scala API.

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

    Since

    2.0.0

  41. def withEnrichCompletionStage(value: Function[ProducerSettings[K, V], CompletionStage[ProducerSettings[K, V]]]): ProducerSettings[K, V]

    Permalink

    Java API.

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

    Since

    2.0.0

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

    Permalink

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

  43. def withEosCommitInterval(eosCommitInterval: FiniteDuration): ProducerSettings[K, V]

    Permalink

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

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

    Permalink

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

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

    Permalink

    Replaces the default Kafka producer creation logic with an external producer.

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

  46. def withProducerFactory(factory: (ProducerSettings[K, V]) ⇒ Producer[K, V]): ProducerSettings[K, V]

    Permalink

    Replaces the default Kafka producer creation logic.

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

Deprecated Value Members

  1. def producerFactory: (ProducerSettings[K, V]) ⇒ Producer[K, V]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) Use createKafkaProducer(), createKafkaProducerAsync(), or createKafkaProducerCompletionStage() to get a new KafkaProducer

Inherited from AnyRef

Inherited from Any

Ungrouped