Trait

net.manub.embeddedkafka.ops

ProducerOps

Related Doc: package ops

Permalink

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. 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. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  15. val producerPublishTimeout: FiniteDuration

    Permalink
    Attributes
    protected
  16. def publishStringMessageToKafka(topic: String, message: String)(implicit config: C): Unit

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def withProducer[K, V, T](body: (KafkaProducer[K, V]) ⇒ T)(implicit config: C, keySerializer: Serializer[K], valueSerializer: Serializer[V]): T

    Permalink

    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. object aKafkaProducer

    Permalink
    Annotations
    @deprecated
    Deprecated

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

  2. def kafkaProducer[K, T](topic: String, key: K, message: T)(implicit config: C, keySerializer: Serializer[K], serializer: Serializer[T]): KafkaProducer[K, T]

    Permalink
    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