Packages

trait ProducerOps[C <: EmbeddedKafkaConfig] extends AnyRef

Trait for Producer-related actions.

C

an EmbeddedKafkaConfig

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProducerOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. val producerPublishTimeout: FiniteDuration
    Attributes
    protected
  16. def publishStringMessageToKafka(topic: String, message: String)(implicit config: C): Unit

    Publishes synchronously a message of type String to the running Kafka broker.

    Publishes synchronously a message of type String to the running Kafka broker.

    topic

    the topic to which publish the message (it will be auto-created)

    message

    the String message to publish

    config

    an implicit EmbeddedKafkaConfig

    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

    See also

    EmbeddedKafka#publishToKafka

  17. def publishToKafka[K, T](topic: String, messages: Seq[(K, T)])(implicit config: C, keySerializer: Serializer[K], serializer: Serializer[T]): Unit

    Publishes synchronously a batch of message to the running Kafka broker.

    Publishes synchronously a batch of message to the running Kafka broker.

    topic

    the topic to which publish the message (it will be auto-created)

    messages

    the keys and messages of type T) to publish

    config

    an implicit EmbeddedKafkaConfig

    keySerializer

    an implicit Serializer for the type K

    serializer

    an implicit Serializer for the type T

    Annotations
    @throws(classOf[KafkaUnavailableException])
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

  18. def publishToKafka[K, T](topic: String, key: K, message: T)(implicit config: C, keySerializer: Serializer[K], serializer: Serializer[T]): Unit

    Publishes synchronously a message to the running Kafka broker.

    Publishes synchronously a message to the running Kafka broker.

    topic

    the topic to which publish the message (it will be auto-created)

    key

    the key of type K to publish

    message

    the message of type T to publish

    config

    an implicit EmbeddedKafkaConfig

    serializer

    an implicit Serializer for the type T

    Annotations
    @throws(classOf[KafkaUnavailableException])
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

  19. def publishToKafka[T](producerRecord: ProducerRecord[String, T])(implicit config: C, serializer: Serializer[T]): Unit

    Publishes synchronously a message to the running Kafka broker.

    Publishes synchronously a message to the running Kafka broker.

    producerRecord

    the producerRecord of type T to publish

    config

    an implicit EmbeddedKafkaConfig

    serializer

    an implicit Serializer for the type T

    Annotations
    @throws(classOf[KafkaUnavailableException])
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

  20. def publishToKafka[T](topic: String, message: T)(implicit config: C, serializer: Serializer[T]): Unit

    Publishes synchronously a message to the running Kafka broker.

    Publishes synchronously a message to the running Kafka broker.

    topic

    the topic to which publish the message (it will be auto-created)

    message

    the message of type T to publish

    config

    an implicit EmbeddedKafkaConfig

    serializer

    an implicit Serializer for the type T

    Annotations
    @throws(classOf[KafkaUnavailableException])
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. def withProducer[K, V, T](body: (KafkaProducer[K, V]) => T)(implicit config: C, keySerializer: Serializer[K], valueSerializer: Serializer[V]): T

    Loaner pattern that allows running a code block with a newly created consumer.

    Loaner pattern that allows running a code block with a newly created consumer. The consumer's lifecycle will be automatically handled and closed at the end of the given code block.

    body

    the function to execute that returns T

    config

    an implicit EmbeddedKafkaConfig

    keySerializer

    an implicit Serializer for the type K

    valueSerializer

    an implicit Serializer for the type V

Deprecated Value Members

  1. def kafkaProducer[K, T](topic: String, key: K, message: T)(implicit config: C, keySerializer: Serializer[K], serializer: Serializer[T]): KafkaProducer[K, T]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.4.1) Direct usage of KafkaProducer is discouraged, see loan method withProducer

  2. object aKafkaProducer
    Annotations
    @deprecated
    Deprecated

    (Since version 2.4.1) Direct usage of KafkaProducer is discouraged, see loan method withProducer

Inherited from AnyRef

Inherited from Any

Ungrouped